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 938967 of <title>

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

Revision Content

{{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}}

 

Revision Source

<p id="Summary">{{HTMLRef}}</p>

<p>The <strong>HTML <code>&lt;title&gt;</code> element</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>

<table class="properties">
 <tbody>
  <tr>
   <th><a href="/en-US/docs/Web/HTML/Content_categories">Content categories</a></th>
   <td><a href="/en-US/docs/Web/HTML/Content_categories#Metadata_content">Metadata content</a>.</td>
  </tr>
  <tr>
   <th>Permitted content</th>
   <td>Text that is not inter-element whitespace</td>
  </tr>
  <tr>
   <th>Tag omission</th>
   <td>Both opening and closing tags are required. Note that leaving off <code>&lt;/title&gt;</code> should cause the browser to ignore the rest of the page</td>
  </tr>
  <tr>
   <th>Permitted parent elements</th>
   <td>A {{ HTMLElement("head") }} element that contains no other {{ HTMLElement("title") }} element.</td>
  </tr>
  <tr>
   <th>DOM interface</th>
   <td>{{domxref("HTMLTitleElement")}}</td>
  </tr>
 </tbody>
</table>

<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/Web/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>

<h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2>

<p>{{CompatibilityTable}}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari (WebKit)</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>1.0</td>
   <td>{{CompatGeckoDesktop(1)}}</td>
   <td>1.0</td>
   <td>1.0</td>
   <td>1.0</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE&nbsp;Phone</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatGeckoMobile(1)}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<p>&nbsp;</p>
Revert to this revision