Expand your HTML skills through an MDN Fellowship - Apply by April 1 http://mzl.la/MDNFellowship

mozilla

Revision 1935 of <title>

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

Revision Content

Summary

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 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 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="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