The title of a page
➔ Set the page title using <title> tag.
➔ The <title> tag should be something that relates to the internal contents of the document.
➔ The <title> tag must inside <head> tag and cannot be used more than once.
More about page titles
➔ The title tag is very important and meaningful for a webpage on the Internet.
➔ The title doesn't show anything in the body of the document but shows a brief description about the page in the browser's title bar.
➔ This title also serves some important functions for users, browsers, and SEO engines.
➔ Search engines use titles to understand the context of the page and its relevance to the user's query, and serve content to users.
➔ The title text also appears in the clickable title of search engine query results.
➔ If a user bookmarks a page, the title is used as the default text, but users can change it to whatever they want.
➔ When a web page is shared on a social platform, the title text is used as the title for the page's link preview.
➔ Screen readers and other assistive technologies also use page title text to get the context or summary of the page.
Best Uses and Good Practices:
➔ Each page on a website should have a unique page title.
➔ The page title should reflect the purpose and contextual meaning of the page to users.
➔ Along with good content, a perfect page title also provides user experience and reflects SEO improvements.
➔ The title should ideally be 40 to 60 characters long, with a short description that is fully meaningful and represents the page's keyword.
syntax
<title>A page's title tag should contain 40 to 60 characters.</title>
Learning with HTML Editor "Try it Now"
You can edit the HTML code and view the result using online editor.
The <title> in head
<!DOCTYPE html>
<html>
<head>
<title>Title of this Page</title>
</head>
<body>
<!-- body contents here-->
</body>
</html>
Example
<!DOCTYPE html>
<html>
<head>
<title>Title of this Page</title>
</head>
<body>
<h2>HTML Title Example</h2>
<p>The title display in the title bar of the browser</p>
<p>Title is not displayed in the body of the page.</p>
</body>
</html>
Click on the "Try it Now" button to see how it works.