<HEAD> | NN all IE all HTML all
<HEAD>...</HEAD> | HTML End Tag: Optional
The head element contains document information that is generally not rendered as part of the document in the browser window. At most, a browser displays the title element's content in the browser window's titlebar. The content of the head element consists entirely of other elements that are intended to assist the browser in working with document data. Another classification of data, handled in one or more meta elements, can also assist search engines and document parsers to learn more about the document based on abstract information supplied by the author. The table below shows the elements that may be nested inside a head element according to three different specifications. Although the HTML 4 or XHTML standards do not explicitly support the id attribute, browsers permit the attribute as part of their support for W3C DOM common properties of all elements.
Element | NN 4+ | IE 4+ | HTML 4 and XHTML
--- | --- | --- | ---
base | √ | √ | √
basefont | √ | √ | -
bgsound | - | √ | -
isindex | √ | - | √
link | √ | √ | √
meta | √ | √ | √
nextid | - | √ | -
object | - | - | √
script | √ | √ | √
style | √ | √ | √
title | √ | √ | √
Example
    <HEAD>
    <META name="Author" content="Danny Goodman">
    <STYLE type="text/css">
        h1 {color:cornflowerblue}
    </STYLE>
    </HEAD>
Object Model Reference
    [window.]document.getElementsByTagName("head")[0]
    [window.]document.getElementById(elementID)
Element-Specific Attributes
profile
Element-Specific Event Handler Attributes
None.

class | NN 4 IE 3 HTML 4
class="className1[ ...classNameN]" | Optional
An identifier generally used to associate an element with a style sheet rule defined for a class selector. See Chapter 3. Use the class attribute only with visible (renderable) elements.
Example
    <A class="chapTitle" name="chapter3" id="chapter3">Chapter 3</A>
Value
Case-sensitive identifier. Multiple classes can be assigned by separating the class names with spaces within the quoted attribute value.
Default
None.
Object Model Reference
    [window.]document.getElementById(elementID).className

id | NN 4 IE 4 HTML 4
id="elementIdentifier" | Optional
A unique identifier that distinguishes this element from all the rest in the document. Can be used to associate a single element with a style rule naming this attribute value as an ID selector. An element can have an ID assigned for uniqueness as well as a class for inclusion within a group. See Chapter 3. IE 4 and later and Netscape 6 allow id attributes for nonrenderable elements, but if your code requires validation, be aware that the W3C HTML 4 and XHTML DTDs do not. Because all W3C DOM elements have an id property, it is natural to assign an id attribute to non-renderable elements if scripts must reference those elements. Or, your scripts may use other ways (e.g., the array returned by document.getElementsByTagName( )) to reference such elements. Assign identifiers to id attributes in order to duplicate values previously only assigned to name attributes in elements that feature the name attribute. Current browser form controls still require name attributes for name/value pairs to be submitted with the form, and a elements acting as anchors still need name attributes. Be sure to assign an identifier to the id attribute of any element you intend to reference by script.
Example
    <H2 id="sect3Head">Section Three</H2>
Value
Case-sensitive identifier.
Default
None.
Object Model Reference
    [window.]document.getElementById(elementID).id

lang | NN 3 IE 4 HTML 4
lang="languageCode" | Optional
The language being used for the element's attribute values and content. A browser can use this information to assist in proper rendering of content with respect to details such as treatment of ligatures (when supported by a particular font or required by a written language), quotation marks, and hyphenation. Other applications and search engines might use this information to aid the selection of spell-checking dictionaries and the creation of indices.
Example
    <SPAN lang="de">Deutsche Bundesbahn</SPAN>
Value
Case-insensitive language code.
Default
Browser default.
Object Model Reference
    [window.]document.getElementById(elementID).lang

profile | NN 6 IE 6 HTML 4
profile="URLList" | Optional
A meta data profile is a separate file that defines one or more meta data property behaviors. The W3C leaves the precise application of this attribute to the whims of the browsers makers. As of Version 6 browsers, nothing special occurs as a result of assigning this attribute.
Example
    <HEAD profile="http://www.giantco.com/profiles/common">
        <META name="Author" content="Jane Smith">
        <META name="keywords" content="benefits,insurance,">
        ...
    </HEAD>
Value
Any valid URL or browser profile constant.
Default
Browser default.
Object Model Reference
    [window.]document.firstChild.firstChild.profile
    [window.]document.getElementsByTagName("head")[0].profile
    [window.]document.getElementById(elementID).profile

title | NN 6 IE 3 HTML 3.2
title="advisoryText" | Optional
An advisory description of the element. For HTML elements that produce visible content on the page, IE 4 and later and Netscape 6 render the content of the title attribute as a tooltip when the cursor rests on the element for a moment. For example, the table-related col element does not display content, so its title attribute is merely advisory. To generate tooltips in tables, assign title attributes to elements such as table, tr, th, or td. The font and color properties of the tooltip are governed by the browser, and are not modifiable under script control. In IE/Windows, the tooltip is the standard small, light-yellow rectangle; in IE/Mac, the tooltip displays as a cartoon bubble in the manner of the Mac OS bubble help system. Netscape 6 tooltips are the same small rectangle on all OS versions. If no attribute is specified, the tooltip does not display. You can assign any descriptive text you like to this attribute. Not everyone will see it, however, so do not put mission-critical information here. Browsers designed to meet web accessibility criteria might use this attribute's information to read information about a link or nontext elements to vision-impaired web surfers. Therefore, don't ignore this potentially helpful aid to describing an element's purpose on the page. Although the compatibility listing for this attribute dates the attribute back to Internet Explorer 3 and HTML 3.2, it is newly ascribed to many elements starting with IE 4 and HTML 4.0.
Example
    <SPAN title="United States of America">U.S.A.</SPAN>
Value
Any string of characters. The string must be inside a matching pair of (single or double) quotation marks.
Default
None.
Object Model Reference
    [window.]document.getElementById(elementID).title