1. html
  2. /tags
  3. /title

<title>

Overview

The <title> element designates a title that identifies a web document. This title appears in various contexts, such as in browser tabs, bookmarks, or search results, helping users identify the document's content or purpose.

Examples and Usage

To demonstrate the significance of the element, let's examine a typical HTML document:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Web Reference - Code Documentation, Tutorials, and Demos</title>
  </head>
  <body>
    <!-- Content of the page goes here -->
  </body>
</html>

In this example, the title "Web Reference - Code Documentation, Tutorials, and Demos" is set within the <head> block. It combines the website's name with its main focus, presenting both descriptively. For other pages on the site, a similar structure would be used, adjusting the title to reflect the specific content of each page, ensuring differentiation and relevance.

Attribute Breakdown

The <title> element doesn't have any specific attributes; it inherits global attributes common to all HTML elements.

Accessibility Aspects

The <title> element provides the accessible name for its document, serving as a critical navigation aid for users with assistive technology. Having an accurate and concise title helps users understand the page's primary focus, thereby facilitating navigation. However, it's worth noting that the <title> element doesn't have a corresponding role in the ARIA (Accessible Rich Internet Applications) specification, nor does it utilize aria-* attributes. This means that it doesn't have any additional descriptive properties within the accessibility structure, relying solely on its textual content to convey meaning.

Associated Elements

Additional Notes

  • Compose your titles thoughtfully and consider SEO practices such as avoiding overly brief or generic terms. Be mindful of the 55-60 character range to fit most search engine displays, and remember that using just a list of keywords might negatively impact search rankings.

  • It is advisable to have unique titles within your site to prevent confusion and contribute to a more accurate search result. Duplicate or near-duplicate titles can mislead users and search engines.

  • Make your titles as engaging and relevant as possible to catch the reader's attention, while reflecting the primary purpose of the page.

Browser Compatibility

For a detailed breakdown of specific browser nuances and older version support refer to the first link in the Useful Resources below.

BrowserChromeEdgeSafariFirefoxOperaInternet Explorer
SupportYesYes*YesYesYes*Yes*

Useful Resources

Can I use HTML element: title

The HTML Living Standard Specification: title