<meta/> Metatags in HTML 5

The <meta> tag is used to define metadata for the HTML document or directions for the HTTP protocol. HTML metatag elements have a content attribute and either a name attribute for document metadata or an http-equiv attribute for protocol directives.

<meta name="..." content="..."/>
<meta http-equiv="..." content="..."/>

Other metadata can be expressed using specific HTML tags, such as:

Rules for coding HTML metatag elements
  1. Code any <meta> tags in the <head> section of the HTML document.
  2. Each meta element consists of a standalone <meta/> tag. The element name uses lower case letters and should be in the HTML namespace, which it will pick up automatically from the xmlns attribute on the <html> tag.
  3. Code either a name= attribute or an http-equiv= attribute, but not both. The value of the attribute, which is enclosed in double quotes, is the name of the metadata or directive.
  4. Code a content= attribute with the value for the named metadata or directive in double quotes.
  5. Since the <meta/> tag is a void element, it should always be coded as a self-closing tag terminated with the delimiters />.

List of <meta> tags in HTML 5

Most Common Metatags

The most common HTML metatags include:

Metatags for Search Engine Optimization (SEO)
Metatags for HTML pages on Mobile / Handheld Devices
Metatags for Apps on Mobile / Handheld Devices
<meta http-equiv="..."/> tags

Less common HTML metatags include:

Changes in HTML 5