HTML <title> Tag

The <title> tag defines a title of an HTML document. A title tag must be the precise description of a page’s content. The title is displayed in the browser toolbar and on search engine results pages (SERPs) as a clickable headline.

The content of the title is an important component that search engine algorithms use to determine the order of list pages’ appearance in search results.

An optimized title tag increases the rank on SERPs and the click-through rate.

Title tags are used for:

  • the short title and description of a page which is displayed at the top of the browser window,
  • the ranking of search engines,
  • the default name for bookmarks created by the user,
  • the link headline when it is shared on social media,
  • the clickable headline.

The title should contain keywords so that search engines rank the page for relevant queries.

There should be only one <title> element in an HTML document located inside the <head> section.

Here are some tips to create good titles:

  • Avoid the use of titles with one or two words. Instead, you can use a descriptive phrase.
  • If possible, avoid special characters as they can be displayed by browsers differently.
  • In general, search engines display about 55-60 characters of a title. When using a longer title, ensure that the important parts are at the beginning.
  • Avoid the use of a list of words as a title.
  • Ensure that the title is unique in your site.


The <title> element comes in pairs. The content is written between the opening (<title>) and closing (</title>) tags.

Example of the HTML <title> tag:

<!DOCTYPE html>
    <title>W3Docs - learn HTML, CSS, PHP, JavaScript online.</title>
    <p>The main content of the page.</p>


title example


The <title> tag supports the Global Attributes.

Browser support

chrome edge firefox safari opera

Practice Your Knowledge

What is true about the HTML title tag according to the information on W3Docs?

Quiz Time: Test Your Skills!

Ready to challenge what you've learned? Dive into our interactive quizzes for a deeper understanding and a fun way to reinforce your knowledge.

Do you find this helpful?