Tag <title> HTML Reference



Example

Define a title for your HTML document:

<html>

<head>
<title>Your website title</title>
</head>

<body>
The content of the document......
</body>

</html>

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

1. Definition and Usage

The <title> tag is required in all HTML documents and it defines the title of the document.

The <title> element:

  • defines a title in the browser toolbar
  • provides a title for the page when it is added to favorites
  • displays a title for the page in search-engine results

2. Tips and Notes

Note: You can NOT have more than one <title> element in an HTML document.

Tip: If you omit the <title> tag, the document will not validate as HTML.


3. Differences Between HTML and XHTML

None


4. Standard Attributes

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

The <title> tag supports the following standard attributes:

Attribute Value Description DTD
dir rtl
ltr
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 <title> tag does not support any event attributes.


Relative articles