Title tags are used to define the web document and it is required by all the Html documents. Title tags are used by search engines to display preview snippets for a given page.
Use of title tag
The title element is used by browsers as well as search engines, let’s see how can we use the title tag.
- Displays in Browser Window: Open any html page in browser, you can see the title at the top of the window.
- Browsers also use it to differentiate the tabs.
- Bookmarks: If you will bookmark a page, then you will see the title in the bookmarked list.
Important Note:
- The title tags of a web page need to be an accurate and concise description of a web page.
- It should be relevant to a page content and it is very important for you as a developer or search engines.
- You cannot use more then one title tag in a web page.
- You cannot forget to use title tag else document will not validate as Html.
Let’s Practice the title tag
Now we will try to understand title tag with examples.
Above picture, clearly say where to use your title element. The place for the title tag is within the head tag and if you will put it in body tag then you will find validation problem.
Where to find title in browsers
A Common place for the browser to show the title element is the top left side of the browser’s window.
Things to Remember:
- The title tag is not a part of the text of the document, but you can say it is a property of the whole document.
- It will not contain any anchors, paragraph marks, or highlighting text.
- The title of any page or web document should be less than 64 characters in length.
- The title can be used to identify the node in a history list.