<head> (Document Head)
This element indicates the document head that contains descriptive information about the HTML document as well as other supplementary information such as style rules or scripts.
Standard Syntax
<head
dir="ltr | rtl"</head>
id="unique alphanumeric identifier"
lang="language code"
profile="url">
Attributes Defined by Internet Explorer
class="class name(s)"
Events Defined by Internet Explorer
onlayoutcomplete, onreadystatechange
Element Specific Attributes
- profile
- This attribute specifies a URL for a meta-information dictionary. The specified profile should indicate the format of allowed meta-data and the potential meaning of the data.
Example
<head>
<title>Big Company Home Page</title>
<base href="http://www.bigcompany.com">
<meta name="Keywords"content="BigCompany, SuperWidget">
</head>
Compatibility
HTML 2, 3.2, 4, 4.01, XHTML 1.0, 1.1, Basic
Internet Explorer 2, 3, 4, 5, 5.5, 6
Netscape 1, 2, 3, 4, 4.5-4.8, 6, 7
Opera 4-7
Notes
The <head> element must contain a <title> element. It also might contain the <base>, <isindex>, <link>, <meta>, <script>, and <style> elements. Internet Explorer 4 supports the inclusion of the <basefont> element in the <head> element, but <basefont> has been deprecated under HTML 4.
Under XHTML 1.0, the closing </head> tag is mandatory.
The meaning of the profile attribute is somewhat unclear, and no browsers appear to support it in any meaningful way.
Internet Explorer may allow the <bgsound> element within <head>.
HTML 2 and 3.2 support no attributes for this element.