<title>

  • Revision slug: HTML/Element/title
  • Revision title: title
  • Revision id: 1931
  • Created:
  • Creator: McGurk
  • Is current revision? No
  • Comment Added syntax highlighting; one or more formatting changes

Revision Content

The HTML Title Element (<title>) defines title of the document, as shown in the browser's title bar or on the page's tab. It can only contain text.

Usage context

Content categories Metadata content.
Permitted content Text
Tag omission All tags required. Note that leaving off </title> may cause the browser to eat the rest of the page.
Permitted parent elements A {{ HTMLElement("head") }} element that contains no other {{ HTMLElement("title") }} elements.
Normative document HTML, "The title element"

Attributes

Like all other HTML elements, this element supports the global attributes. It does not support any other elements.

DOM interface

This element implements the HTMLTitleElement interface.

Example

<title>Awesome page title</title>

Revision Source

<p>The <em>HTML Title Element</em> (<code>&lt;title&gt;</code>) defines title of the document, as shown in the browser's title bar or on the page's tab. It can only contain text.</p>
<h2>Usage context</h2>
<table class="fullwidth-table"> <tbody> <tr> <td><a href="/en/HTML/Content_categories" title="en/HTML/Content categories">Content categories</a></td> <td>Metadata content.</td> </tr> <tr> <td>Permitted content</td> <td>Text</td> </tr> <tr> <td>Tag omission</td> <td>All tags required. Note that leaving off <code>&lt;/title&gt;</code> may cause the browser to eat the rest of the page.</td> </tr> <tr> <td>Permitted parent elements</td> <td>A {{ HTMLElement("head") }} element that contains no other {{ HTMLElement("title") }} elements.</td> </tr> <tr> <td>Normative document</td> <td><a class=" external" href="http://www.whatwg.org/html/#the-title-element">HTML, "The <code>title</code> element"</a></td> </tr> </tbody>
</table>
<h2>Attributes</h2>
<p>Like all other HTML elements, this element supports the <a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">global attributes</a>. It does not support any other elements.</p>
<h2>DOM interface</h2>
<p>This element implements the <code><a href="/en/DOM/HTMLTitleElement" title="en/DOM/HTMLTitleElement">HTMLTitleElement</a></code> interface.</p>
<h2>Example</h2>
<pre class="brush: html">&lt;title&gt;Awesome page title&lt;/title&gt;
</pre>
Revert to this revision