<title>

  • Revision slug: Web/HTML/Element/title
  • Revision title: <title>
  • Revision id: 492889
  • Created:
  • Creator: kscarfone
  • Is current revision? No
  • Comment Changed {{HTML:Element-Navigation}} to {{HTMLRef}}

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 categories Metadata 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 elements A {{ HTMLElement("head") }} element that contains no other {{ HTMLElement("title") }} element.
Normative document HTML 5, section 4.2.2, HTML 4.01, section 7.4.2

Attributes

This element only includes the global attributes.

DOM interface

This element implements the HTMLTitleElement interface.

Example

<title>Awesome page title</title>

{{ languages({ "en":"en/HTML/Element/title", "ja":"ja/HTML/Element/title"}) }}

{{HTMLRef}}

Revision Source

<h2 id="Summary">Summary</h2>
<p>The <em>HTML Title Element</em> (<code>&lt;title&gt;</code>) 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="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> should 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") }} element.</td>
  </tr>
  <tr>
   <td>Normative document</td>
   <td><a class="external" href="http://dev.w3.org/html5/spec/Overview.html#the-title-element" title="http://dev.w3.org/html5/spec/Overview.html#the-title-element">HTML 5, section 4.2.2</a>, <a class="external" href="http://www.w3.org/TR/html401/struct/global.html#h-7.4.2" title="http://www.w3.org/TR/html401/struct/global.html#h-7.4.2">HTML 4.01, section 7.4.2</a></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/HTML/Global_attributes" style="line-height: 21px;" title="HTML/Global attributes">global attributes</a><span style="line-height: 21px;">.</span></p>
<h2 id="DOM_interface">DOM interface</h2>
<p>This element implements the <code><a href="/en/DOM/HTMLTitleElement" title="en/DOM/HTMLTitleElement">HTMLTitleElement</a></code> interface.</p>
<h2 id="Example">Example</h2>
<pre class="brush: html">
&lt;title&gt;Awesome page title&lt;/title&gt;
</pre>
<p>{{ languages({ "en":"en/HTML/Element/title", "ja":"ja/HTML/Element/title"}) }}</p>
<p>{{HTMLRef}}</p>
Revert to this revision