Learning Resources
 

HTML Meta Tags


Meta elements are the HTML or XHTML element used to provide structured metadata about a Web page. Multiple elements are often used on the same page: the element is the same, but its attributes are different. Meta elements can be used to specify page description, keywords and any other metadata not provided through the other head elements and attributes.

The meta element has two uses: either to emulate the use of the HTTP response header, or to embed additional metadata within the HTML document.

With HTML up to and including HTML 4.01 and XHTML, there were four valid attributes: content, https-equiv, name and scheme. Under HTML 5 there are now five valid attributes: charset having been added. https-equiv is used to emulate the HTTP header. name to embed metadata. The value of the statement, in either case, is contained in the content attribute, which is the only required attribute unless charset is given. charset is used to indicate the character set of the document, and is available in HTML5.

 

The tag provides metadata about the HTML document. Metadata will not be displayed on the page, but will be machine parsable.

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

The tag always goes inside the element.

The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services.

 

META tags have two possible attributes:

   
   

META tags should be placed in the head of the HTML document, between the and tags (especially important in documents using FRAMES).



DESCRIPTION

Most search engines will display the description when they list results from a search.
If you do not include this tag, then the engine will simply list the first words on the page - which is not always very meaningful.


KEYWORDS

This meta tag was intended to be used for keywords with special relevance for the page.
But because of misuse, many engines skip them. Others use them as an indicator of whether a page is spam or not.
The few that use them to indicate what the page is really about, do not value them as much as they used to.



OTHER TAGS
Many HTML editors create a meta tag telling which program was used for the page.



Another common tag tells who created the page:



Finally there are some meta tags that are only relevant to certain search engines.
Individual search engines will recognize different tags telling it when to come back and re-index the site etc.
Look at the help sections for particular search engines to see which meta tags are supported.