Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML <title> Tag


Example

Define a title for your HTML document:

<!DOCTYPE html>
<html>

<head>
  <title>HTML Elements Reference</title>
</head>

<body>
The content of the document......
</body>

</html>
Try it Yourself »

Definition and Usage

The <title> tag is required in all HTML documents and it defines the title of the document.

The contents of a page title is very important for search engine optimization (SEO)! The page title is used by search engine algorithms to decide the order when listing pages in search results.

The <title> element:

  • defines a title in the browser toolbar
  • provides a title for the page when it is added to favorites
  • displays a title for the page in search-engine results

Here are some tips for creating good titles:

  • Go for a longer, descriptive title (avoid one- or two-word titles)
  • Search engines will display about 50-60 characters of the title, so try not to have titles longer than that
  • Do not use just a list of words as the title (this may reduce the page's position in search results)

So, try to make the title as accurate and meaningful as possible!

Note: You can NOT have more than one <title> element in an HTML document.



Browser Support

Element
<title> Yes Yes Yes Yes Yes

Global Attributes

The <title> tag also supports the Global Attributes in HTML.


Related Pages

HTML tutorial: HTML Head

HTML DOM reference: Title Object


Default CSS Settings

Most browsers will display the <title> element with the following default values:

title {
  display: none;
}