HTML Meta Tags
Metadata provides additional information about a webpage, such as a page description, copyright information, language, and more. This information is not displayed on the webpage itself but is instead used by web browsers and search engines to better understand the page's content.
The <meta> tag is placed within the <head> tag of an HTML document. Here are some of the attributes and syntax used with the <meta> tag:
1. Charset attribute
The Charset attribute defines the character encoding used in the document. The most common value is "UTF-8", which supports displaying any language in a web browser.
2. Name attribute
The name attribute can define multiple things like description, author, refresh, and viewport.
- name="viewport" defines the viewport to control the page dimension and scaling so that it will look good on every screen size.
- name="keyword" specifies the list of different keywords which is used by search engines.
- name="description" specifies the website description which is relevant to the search performed by search engines.
Whatever name we define within the attribute value, the same behavior will be supported by the content attribute.
3. HTTP-Equiv attribute
The HTTP-Equiv attribute sets a URL with content, so the page will automatically redirect to the specified page after a provided time.
Supporting Browsers
Element |
|||||
Marquee |
Yes |
Yes |
Yes |
Yes |
Yes |