Wednesday, January 5, 2011

The head Element

The head element contains information that describes the (X)HTML document. This information is not considered part of the content of an (X)HTML page and is therefore not displayed in the viewport.

The head element must contain one title element.

These are the elements that head can contain:

  • title
  • base
  • meta
  • script
  • link
  • style
  • object

There can be only one title and base element. However, the other elements can be present multiple times.


lang and xml:lang
These attributes specifiy the language of the contents of the head element. However, this attribute is more often specified for the html element. See this page for more information.
See this page.
This attribute is used to uniquely name the head element. It is allowed on the head element only when the doctype is XHTML.
The value of this attribute is the URI of a document that provides more information of the meta element's content attribute.

Here is the's HTML 4 specification page for the head element.