head ElementThe head element is declared by the XHTML 1.1 Structure Module
Elements in the Structure Module are:html | head | title | body
The head element contains information about the document which is not to be displayed as part of its content.
For example, the title element within the head contains a title for the document
(this is not displayed on the page itself, but is usually available in the title bar of the window or tab
containing the document and is often used by search engines or when a page is bookmarked).
The link element can, amongst other things, be used to specify a style sheet to govern the page's presentation to the
user, whether visually, aurally, for a printer, etc.
A valid XHTML 1.1 document must contain one and only one head element as the first child of the root
html element. The head element must
contain one and only one title
element at any position within its children. It may also optionally contain one base element
(but not more than one), again at any position within its children. Other possible children of the head element are
meta, link, script,
style and object, which may appear in any order and
any number of times.
An example head element is shown below, which specifies the obligatory title and nothing else.
<head>
<title>Page Title</title>
</head>
There are no #REQUIRED attributes on the head element.
head element are listed below:head element are listed below:Note: Even though the
*XHTML 1.1 Structure Module DTD
specifies that the id attribute is
permitted on the head element, the *W3C Markup Validator
does not currently recognise this and a document which uses this attribute on the head element
will fail validation. I have therefore omitted the
id attribute on the head element in this reference.
dir [ type Enumeration (ltr | rtl) ], from the Bi-directional Text Modulexml:lang [ type LanguageCode ]head element is:
HeadOpts.mix*, ( ( base, HeadOpts.mix*, title, HeadOpts.mix* ) | ( title, HeadOpts.mix*, ( base, HeadOpts.mix* )? ) )
NOTE: This element cannot be empty
See Content Model & Nesting for information about Content Model syntax and Nesting Groups.
headtitlebaselinkmetastylescriptobjectheadhtml