HTML <meta> tag

Updated: 09/12/2023 by Computer Hope
HTML meta tag

When writing in HTML (hypertext markup language), the <meta> tag is used to provide metadata about a web page. All <meta> tags are stored in the <head> element and while they're not visible on the page, they are still viewable to browsers and search engines. They are useful for storing information, like keywords and content descriptions.

The following sections contain information about the <meta> tag, including an example of its code, and related attributes and browser compatibility.

Example code

<head>
<meta charset="UTF-8">
<meta name="description" content="Meta tag definition">
<meta name="robots" content="nzdpo"/>
<meta name="twitter:card" content="summary"/>
</head>

Attributes

All HTML tags support standard attributes that define the settings of an HTML element. In addition to the standard settings, the <meta> tag has the following unique attributes.

Attribute Description
charset Designates the character encoding for the web page.
content Gives the value associated with the name attribute or http-equiv.
http-equiv Creates an HTTP (hypertext transfer protocol) header for the value of the content attribute.
name Designates the name for the metadata.

Deprecated attributes

In addition to the above attributes, the <meta> tag had the following deprecated attributes.

Attribute Description
scheme Designates the scheme used to interpret the value of the content attribute.

Compatibility

Edge Internet Explorer Firefox Safari Opera Chrome
All versions All versions All versions All version All versions All versions

Browser, Code, Compatibility, Encode, Keyword, Meta tags, Web design terms