mozilla

Revision 1936 of <title>

  • Revision slug: HTML/Element/title
  • Revision title: title
  • Revision id: 1936
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment 10 words added, 2 words removed

Revision Content

Summary

The HTML Title Element (<title>) defines the title of the document, using shown in a browser's title bar or on the page's tab. It can only contain text and any contained tags is not interpreted.

Usage context

Content categories Metadata content.
Permitted content Text
Tag omission All tags required. Note that leaving off </title> may cause the browser to ignore 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 attribute.

DOM interface

This element implements the HTMLTitleElement interface.

Example

<title>Awesome page title</title>

Revision Source

<h2>Summary</h2>
<p>The <em>HTML Title Element</em> (<code>&lt;title&gt;</code>) defines the title of the document, using shown in a browser's title bar or on the page's tab. It can only contain text and any contained tags is not interpreted.</p><h2>Usage context</h2>
<table class="standard-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 ignore 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 attribute.</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