Home » HTML » HTML Title

HTML Title

HTML Title Tag

HTML <title> tag is required in all HTML documents and it defines the title of the page. The title tag is also one of the ranking factor for search engines. When you write search engine friendly titles, search engines give you better rankings in their search results.

Page titles are meant to be accurate, concise page's content. Your title should be below 60 character because Google search engine displays only first 50–60 characters of a title tag.

The <title> tag is used inside the <head> tag. It is a paired tag and the page title is written between opening and closing tags.

Title Tag


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>

HTML Title Attribute

The title attribute is used to give tooltip in an element. Tooltip is a kind of brief information about a particular element in the webspage. It gets displayed when user hovers the cursor over the element.

The title attribute can be used with several HTML tags. The syntax is given below in the example:


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> HTML Title Attribute </title>
</head>
<body>
<p><abbr title="World Health Organization">WHO</abbr> was founded in 1948.</p>
<p title="Free Web tutorials">CodeRepublics.com</p>
</body>
</html>

Output

HTML Title Attribute Example

WHO was founded in 1948.

CodeRepublics.com


Browser Support

Element
Microsoft Edge browser.png Edge
Chrome browser.png Chrome
Firefox browser.png Firefox
Opera browser.png Opera
safari browser.png Safari
<title>
Yes
Yes
Yes
Yes
Yes