meta tag
The meta tag, which, when implemented in the code, is written like this - <meta>, is an HTML tag that belongs to meta info tags. Meta HTML tags allow specifying meta-information about a document, i.e. its general properties that define who all the other content is interpreted and perceived, mainly by parsers (browsers, search engines), but also by users.
<meta> defines meta-data that provides information about the document as a whole. This tag is supported in the current version of HTML, which is HTML5.
Browser support
Here you can see whether <meta> is supported by a certain browser, and, if yes, starting from which version it is supported.
Chrome | Firefox | Edge | Opera | Safari |
---|---|---|---|---|
Is supported | Is supported | Is supported | Is supported | Is supported |
Attributes and values
An attribute is a piece of additional information about a tag. While tags denote the type of objects they mark or create, attributes set the parameters of these objects. These parameters can include anything from the types of possible interactions to its visual style to its actual contents.
Values indicate how a certain attribute is actually implemented, if there is a number of ways it can happen.
What attributes are actually allowed in a certain tag depends on the tag itself. Much like possible attributes depend on a tag, possible values depend on an attribute.
The <meta> tag supports the following attributes (with their respective values):
Attribute | Value | Description |
---|---|---|
charset | character_set | Specifies the character encoding for the HTML document |
content | text | Gives the value associated with the http-equiv or name attribute |
http-equiv |
| Provides an HTTP header for the information/value of the content attribute |
name |
| Specifies a name for the metadata |
scheme | format/URI | Specifies a scheme to be used to interpret the value of the content attribute (Not Supported in HTML5) |
width |
| Specifies the width of a cell (Not Supported in HTML5) |
Global Attributes
Global attributes are HTML tag attributes that can be used by any tag, hence the name "global". They are in contrast to unique attributes that are tag-specific.
<meta> supports global attributes.
Event Attributes
Event attributes are HTML tag attributes that allow triggering actions upon specific conditions, hence the name "event". Other types of attributes, namely global and unique attributes, can also trigger actions, but the difference is that even attributes allow calling scripts, such as JavaScript functions, while most other attributes only support a certain type of action.
<meta> supports event attributes.