<title>

What is it?

The <title> element gives the document a title. The text between <title> and </title> is the title text. [2] [6]

Example showing text placed between opening and closing title tags
An example of how text is written between the opening and closing <title> tags.
Source: Screenshot of example from [2]

Why is it used?

The title appears in the browser tab and is used when someone bookmarks the page. It may also appear in search results. [2] [6]

Example on This Page

In this page’s <head>, I wrote <title>Title</title>. The word Title therefore appears in the browser tab when this page is open.

Example showing a page title displayed in a browser tab
An example of where a page’s title appears in the browser tab.
Source: Screenshot of example from [2]

What I Learned

While making this page, I learned that the <title> element belongs in the <head>, even though its text appears in the browser tab rather than in the main page content. I saw this on my own page when I added <title>Title</title> and checked the tab.