HTML <meta> tag

Updated: 10/11/2017 by Computer Hope

HTML meta tagWhen writing in HTML, 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, as well as 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

Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. The following table shows the current unique HTML attributes for the <meta> tag, as well as a description of each.

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 header for the value of the content attribute
name Designates the name for the metadata

Deprecated attributes

A deprecated attribute is one that may function currently but is not supported in going forward. While the attribute may work with the current version of HTML, it will eventually be phased out. It is better to avoid using these attributes to help future-proof your website.

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

Compatibility

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

Related pages

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