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.
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.
Syntax
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>
<html>
<head>
<title>W3Docs - learn HTML, CSS, PHP, JavaScript online.</title>
</head>
<body>
<p>The main content of the page.</p>
</body>
</html>
Result
Attributes
The <title> tag supports the Global Attributes.
Browser support
✓ | ✓ | ✓ | ✓ | ✓ |
Practice Your Knowledge
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.