HTML <meta> Tag

Description:

The <meta> tag provides metadata about the HTML document. Metadata will not be displayed on the page.

Meta elements are typically used to specify page description, keywords, author of the document, last modified, and other metadata.

The <meta> tag always goes inside the head element.

 

Specific Attributes:

Attribute Definition
name Name for the property. Can be anything. Examples include, keywords, description, author, revised, generator etc.
content Specifies the property's value.
scheme Specifies a scheme to use to interpret the property's value (as declared in the content attribute).
http-equiv Used for http response message headers. For example http-equiv can be used to refresh the page or to set a cookie. Values include content-type, expires, refresh and set-cookie.

Other Attributes:

Attribute Definition
lang Specifies a language code for the content in an element.
dir

Specifies the text direction for the content in an element.
Possible Values:

  • rtl  (Right to Left)
  • ltr  (Left to Right)

Example Code:

<head>
<meta name="description" content="Description of website" />
<meta name="keywords" content="Keywords Used" />
<meta name="author" content="Authors Name" />
</head>