Welcome to Our Free Tutorial!

HTML Meta Tag

Metadata is information about data. Meta tags allow you to provide metadata about your HTML pages. This is very useful for search engines. Metadata is a very important part of the web.

The <meta> tag provides metadata about the HTML document. Metadata is not show on the page. It shows view source in the html page.

It is basically used to specify page description, keywords, author of the document, last modified, and other metadata.

The <meta> tag always inside the head element.

Keywords for Search Engines:-

Search engine use the name and content attributes of the meta element to index your pages.
The following meta element defines a description of a page:
<meta name="description" content="Tutorials on HTML, CSS, XML" />
The following meta element defines keywords for a page:
<meta name="keywords" content="HTML, CSS, XML" />

Adding Meta Tags on your Web page

You can add metadata to your web pages by placing <meta> tags between the <head> and </head> tags.

Attribute Description
Name Name for the property. It Can be anything. Examples include, keywords etc.
Content Specify the property value.
Scheme Specify a scheme to use the property’s value as declared in the content value.
http-equiv Used for http response message header. For example http-equiv can be used to refresh the page.

Example HTML Code:


<meta name="keywords" content="HTML, ASP.NET,XML" />


<meta name="description" content="Contains info about meta tags" />
<meta name="xyz" content="aonestudy,1/1/2011" />
Refresh the page every 10 seconds:
<meta http-equiv="refresh" content="10" />