The HTML5 meta Tag

When authors have the need to add metadata to the HTML document, the HTML5 <meta> tag has to be incorporated within the document. Metadata is best described as the information which pertains to the data in the document. This may not be visible for users once they open the web page which contains the HTML document but it is important for the machine to read.

Typically, the HTML5 <meta> tag is utilized for providing information like the page description, keywords used, name of the document’s author and date of last modification.

It has to be remembered that when the HTML5 <meta> tag is used, this should be placed within the head element.

The good thing is that the HTML5 <meta> tag is compatible with most of the major websites that are being used these days. Whether the user has Internet Explorer, Google Chrome, Safari, Firefox or Opera installed in his/her computer or device, using the HTML5 <meta> tag has no negative effect. However, it is capable of supporting only the Global Attributes.

The use of <meta> tag has a slight difference in HTML5 and HTML4.01. First, the scheme attribute is no longer functional in HTML5. For HTML5, it has a new attribute called charset.

The attributes for HTML5 <meta> tag are the following:

Attribute

Value

Description

charset

character_set

This is the key in determining the character encoding that is used for the HTML document

content

text

This is the key in providing the value that is related to the name attribute or http-equiv

http-equiv

content-type default-style refresh

This is essential in adding an HTTP header which applies for the information or value of the content attribute

Name

application-name author description generator keywords

It is utilized in providing a name for the metadata within the document