Definition
The content attribute specifies the name for the http-equiv or name attribute, depending on which is used.
Applicable Elements
The content Attribute can be used with the following elements:
HTML <meta> content Attribute
The <meta> tag specifies metadata, or information, about a HTML document that cannot otherwise be expressed using the <title>, <base>, <link>, <style>, or <script> tags.
The content attribute specifies the name for the http-equiv or name attribute, depending on which is used.
Syntax
<meta name="viewport" content="width=device-width" />Usage
- The
contentattribute holds the value for either thehttp-equivornameattribute. See those attributes for usage requirements.
Examples
Below are two examples of the content attribute. One is pairing it with an http-equiv attribute, the other with a name attribute.
<meta name="generator" content="Hugo 0.80.0" /><meta http-equiv="X-UA-Compatible" content="IE=edge">Specification
The content HTML specification for the <meta> element is as follows:
Browser Support
The content has the following browser support:
Desktop
| Chrome | Edge | Firefox | IE | Opera | Safari | |
|---|---|---|---|---|---|---|
<meta> | Yes | Yes | Yes | Yes | Yes | Yes |
Mobile
| Android Webview | Chrome Android | Firefox Android | Opera Android | iOS Safari | Samsung Internet | |
|---|---|---|---|---|---|---|
<meta> | Yes | Yes | Yes | Yes | Yes | Yes |
