Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 777423 of <title>

  • Revision slug: Web/HTML/Element/title
  • Revision title: <title>
  • Revision id: 777423
  • Created:
  • Creator: Jeremie
  • Is current revision? No
  • Comment

Revision Content

Summary

The HTML Title Element (<title>) 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 categoriesMetadata content.
  • Permitted content Text
  • Tag omission All tags required. Note that leaving off </title> should cause the browser to ignore the rest of the page.
  • Permitted parent elementsA {{ 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')}}  

{{HTMLRef}}

Revision Source

<h2 id="Summary">Summary</h2>

<p>The <em>HTML Title Element</em> (<strong>&lt;title&gt;</strong>) 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.</p>

<h2 id="Usage_context">Usage context</h2>

<ul class="htmlelt">
 <li><dfn><a href="/en-US/docs/HTML/Content_categories" title="HTML/Content_categories">Content categories</a></dfn>Metadata content.</li>
 <li><dfn>Permitted content</dfn> Text</li>
 <li><dfn>Tag omission</dfn> All tags required. Note that leaving off <code>&lt;/title&gt;</code> should cause the browser to ignore the rest of the page.</li>
 <li><dfn>Permitted parent elements</dfn>A {{ HTMLElement("head") }} element that contains no other {{ HTMLElement("title") }} element.</li>
 <li><dfn>DOM interface</dfn> {{domxref("HTMLTitleElement")}}</li>
</ul>

<h2 id="Attributes">Attributes</h2>

<p><span style="line-height: 21px;">This element only includes the&nbsp;</span><a href="https://developer.mozilla.org/en-US/docs/HTML/Global_attributes" style="line-height: 21px;" title="HTML/Global attributes">global attributes</a><span style="line-height: 21px;">.</span></p>

<h2 id="Example">Example</h2>

<pre class="brush: html">
&lt;title&gt;Awesome page title&lt;/title&gt;
</pre>

<h2 id="Specifications" name="Specifications">Specifications</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('HTML WHATWG', 'semantics.html#the-title-element', '&lt;title&gt;')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', 'document-metadata.html#the-title-element', '&lt;title&gt;')}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML4.01', 'struct/global.html#h-7.4.2', '&lt;title&gt;')}}</td>
   <td>{{Spec2('HTML4.01')}}</td>
   <td>&nbsp;</td>
  </tr>
 </tbody>
</table>

<p>{{HTMLRef}}</p>
Revert to this revision