Skip to main content

What does the <title> tag do inside <head>?

The <title> tag inside <head> sets the HTML page's title, a short text that is shown:

  • in the browser tab,
  • in search results (SEO snippets),
  • when bookmarking the page,
  • and in browser messages (for example, when hovering over the tab).

1. Main purpose

<title> describes what the page is about. It helps the user navigate, and helps search engines - index the site correctly.

Example:

html
<head> <title>Online store of sports apparel</title> </head>

Result:

  • On the tab: Online store of sports apparel
  • In Google: this text will be the search result's title.

2. Requirements for the <title> tag

  • Required in every HTML document.
  • Can contain only text, without other tags or HTML entities.
  • Recommended length - 50-60 characters (so it displays correctly in search).

Incorrect:

html
<title><b>Home</b></title> <!-- Tags inside are not allowed -->

3. Impact on SEO

Search engines use <title> as the main signal about the page's content. A well-written title increases:

  • click-through rate (CTR) in search results,
  • the page's relevance to the query,
  • and brand recognition.

Example of a good SEO tag:

html
<title>Buy Nike sneakers: prices, deals, nationwide delivery</title>

4. Use on social networks

If special meta tags (og:title) are not set, social networks also take the link's title from <title> when it is shared.


Summary:

CharacteristicDescription
LocationInside <head>
ContentText only
PurposePage title for the tab, search, and bookmarks
RequiredYes
SEO valueVery high

In simple terms: <title> is the page's official name. The user sees it on the browser tab, and the search engine, in the search results. Without it, the page is like a document with no title.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.

What does the <title> tag do inside <head>?: HTML Interview Question