HTML <title> tag

Definition and usage

<title> Tags define the title of the document. The title must be plain text and displayed in the browser's title bar or the page's tab.

<title> Tags are essential in HTML documents!

The content of the page title is very important for Search Engine Optimization (SEO)!Search engine algorithms use the page title to determine the order of pages listed in search results.

<title> Element:

  • Define the title in the browser toolbar
  • Provide a title for the page when adding it to favorites
  • Display the page title in search engine results

Here are some suggestions for creating good titles:

  • Choose longer and descriptive titles (avoid titles that contain only one or two words)
  • Search engines will display approximately 50-60 characters of the title, so please avoid overly long titles
  • Do not simply set the title as a list of words (this may reduce the page's ranking in search results)

Therefore, try to make the title accurate and meaningful!

Note:A single HTML document cannot contain multiple <title> Element.

See also:

HTML Tutorial:HTML Header

HTML DOM Reference Manual:Title Object

Example

Define a title for your HTML document:

<!DOCTYPE html>
<html>
<head>
  <title>HTML Reference Manual</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>

Try It Yourself

Global Attributes

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

Default CSS Settings

Most browsers will use the following default values to display <title> Element:

title {
  display: none;
}

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support