HTML <title> (Document Title) Tag
Example
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
<h1>Heading of the document</h1>
<p>Paragraph of the document</p>
</body>
</html>
Meaning
The <title> element encloses the title of an HTML document.
It must occur within a document’s <head> element and must be present in all valid documents.
There should be only a single occurrence of this element. Meaningful titles are very important because they are used for bookmarking a page, are occasionally used by browsers to label locally saved pages, and are often used by search engines attempting to index the document.
Notes:
- The HTML <title> element is found within the <head> tag.
- You MUST include the <title> tag within the <head> tag in your document.
Tips:
- Try to make sure your titles are as unique as possible within your own site.
- Search engines typically display about the first 55–60 characters of a page title.
- Avoid one- or two-word titles.
Version: HTML 2, 3.2, 4, 4.01, 5
Standard Syntax
<title>...</title>
Browser Support
Status
Global Attributes
The <title> element also supports the Global Attributes in HTML.
By Default CSS Value(s)
Most of the browsers will display the <title> element with the following by default value(s)
title {
display: none;
}