HTML - <title> Tag



HTML title tag is used to represent the webpage title that can be visible on the browser title bar, and we can also observe it on the search engine result page.

The <title> tag is defined inside of the <head> tag, and it should be text-only. It is visible in the browser’s title bar or in the page’s bar.

HTML title Tag

If we define the title of an HTML document, then it helps to relate the document, like the name of the organization or the name of the page.

Syntax

<title> The title of the page will come here... </title>

Attribute

HTML title tag supports Global Attributes of HTML

Try to click the icon run button run button to run the following HTML code to see the output.

Examples of HTML title Tag

Bellow examples will not show you the effect of title tag because we are running the code in online editor, so there will be no window bar. If you save that code loacally and open it on any browser you cen see the title tag text on the browser window tab.

Using title tag to create tab title

In the following example, we are creating a simple HTML document that contains a title of the page.

<!DOCTYPE html>
<html>
<head>
   <title>this_is_title</title>
</head>
<body></body>
</html>

Tips to Create Good Title

It is not necessary to follow all the points mentioned bellow to create good title. The first priority to create a title is that the keywords shold be relatable to the content. If you open our landing page you can see on the browser tab "Online Tutorials, Courses, and eBooks Library | Tutorialspoint" as you have seen at the top of this post.

  • Always choose meaningfull and related keyowrds for the title that you are creating.
  • Seacrh engines can display 50-60 characters so keep your in that leght.
  • Do not use list of keywords that does not make any sence.
Note: You can NOT have more than one <title> element in an HTML document.

Supported Browsers

Tag Chrome Edge Firefox Safari Opera
title Yes Yes Yes Yes Yes
html_tags_reference.htm
Advertisements