HTML Tag: meta
Metadata — information about the HTML document — that can not be covered by the title
, style
, link
, base
, or script
elements.
meta
elements usually sit most comfortably inside the head
element.
Optional Attributes
Attribute | Description | Possible values |
---|---|---|
name |
Name of textual metadata. Used in conjunction with the content attribute. |
Text. Some commonly used metadata names include:
|
http-equiv |
A “pragma directive”, mimicking a server-side HTTP instruction. Used in conjunction with the content attribute. |
|
content |
The value of the element. Either textual metadata, when given a name by the name attribute, or the value of a corresponding http-equiv attribute. |
Text. |
charset |
The character encoding of the HTML page. Should only be used once. | A character encoding declaration. UTF-8 is advised. |
Global attributes |
Example
<head lang="en">
<meta charset="utf-8">
<title>HTML Tag: meta</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
</head>