{{HTMLRef}}
The HTML <title>
element defines the title of the document, shown in a browser's title bar or on the page's tab. It can only contain text and any contained tags are not interpreted.
Usage context
Content categories | Metadata content. |
---|---|
Permitted content | Text that is not inter-element whitespace |
Tag omission | Both opening and closing tags are required. Note that leaving off </title> should cause the browser to ignore the rest of the page |
Permitted parent elements | A {{ HTMLElement("head") }} element that contains no other {{ HTMLElement("title") }} element. |
DOM interface | {{domxref("HTMLTitleElement")}} |
Attributes
This element only includes the global attributes.
Example
<title>Awesome page title</title>
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', 'semantics.html#the-title-element', '<title>')}} | {{Spec2('HTML WHATWG')}} | |
{{SpecName('HTML5 W3C', 'document-metadata.html#the-title-element', '<title>')}} | {{Spec2('HTML5 W3C')}} | |
{{SpecName('HTML4.01', 'struct/global.html#h-7.4.2', '<title>')}} | {{Spec2('HTML4.01')}} |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 1.0 | {{CompatGeckoDesktop(1)}} | 1.0 | 1.0 | 1.0 |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoMobile(1)}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |