HTML <meta> Tag
The meta tag contains data or metadata that isn't shown on the page but is used by browsers and search engines. The <meta>
element is also a common name for this tag.
<meta>
tags are used to indicate character set, page description, keywords, document author, and viewport settings. They are always placed inside the <head>
element.
The metadata will not be shown on the website, but it can be parsed by machines.
Browsers (how to show content or reload page), search engines (keywords), and other web services all employ metadata.
The <meta>
tag provides a way for web designers to manage the viewport.
Syntax
Attributes
Attribute | Value | Description |
---|---|---|
charset | character-set | The HTML document's character encoding is specified here. |
content | text | This attribute specifies the value for the http-equiv or name attribute. |
http-equiv |
content-security-policy
content-type default-style refresh |
Provides an HTTP header with the content attribute's information and value. |
name |
application-name
author description generator keywords viewport |
The metadata is given a name. |
Supported Browsers
Element | Chrome | Firefox | Safari | Edge / IE | Opera |
---|---|---|---|---|---|
<meta> | Yes | Yes | Yes | Yes | Yes |