HTML – Meta Tags

  • HTML comments are the most important part of the code. HTML comments are not displayed in the browser. HTML meta tags are special elements used to provide additional information about an HTML document.
  • These are placed in the head section.

Meta tags are not visible to the users. These are used by search engines, social media platforms, and web browsers delimiters. to gather information about a webpage>and is ignored by the web browser when rendering the page.

It is used to specify the character set, page description, keywords, author of the document, and viewport settings.

Here are some commonly used meta tags:


<meta charset=”UTF-8″>

Specifies the character encoding for the HTML document. UTF-8 is the most common character encoding.


<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>

Sets the viewport properties for responsive web design, ensuring proper rendering on various devices and screen sizes.


<meta name=”description” content=”Description of the page”>

Provides a brief summary or description of the webpage’s content. Search engines often display this description in search results


<meta name=”author” content=”Author name”>

Specifies the author of the webpage.


<meta http-equiv=”refresh” content=”5″ URL=http://example.com/>

Redirects the user to another page after a specified time interval (in seconds). Means in 5 seconds.


<meta name=”keywords” content=”keyword1, keyword2, …”>

Defines keywords for search engines.

Example:

class-image

Leave a Comment