Tag <head> HTML Reference


A simple HTML document, with the minimum of required tags:

<title>Title of the document</title>

The content of the document......


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

1. Definition and Usage

The <head> element is a container for all the head elements.

The <head> element must include a title for the document, and can include scripts, styles, meta information, and more.

The following elements can go inside the <head> element:

2. Differences Between HTML and XHTML


3. Optional Attributes

DTD indicates in which HTML 4.01/XHTML 1.0 DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.

Attribute Value Description DTD
profile URL Specifies a URL to a document that contains a set of rules. The rules can be read by browsers to clearly understand the information in the <meta> tag's content attribute STF

4. Standard Attributes

The <head> tag supports the following standard attributes:

Attribute Value Description DTD
dir rtl
Specifies the text direction for the content in an element STF
lang language_code Specifies a language code for the content in an element STF
xml:lang language_code Specifies a language code for the content in an element, in XHTML documents STF

5. Event Attributes

The <head> tag does not support any event attributes.

Relative articles