HTML Β· Chapter 17 of 45

HTML Page Title

The <title> tag, placed inside <head>, defines the text shown in the browser tab and used as the default name when bookmarking a page.

The title is also critical for SEO β€” it's typically shown as the clickable headline in search engine results, so it should be descriptive and unique per page.

Syntax
<title>Page Title</title>

Why title matters

Besides appearing in the browser tab, the title tag is heavily weighted by search engines and shown as the main link text in search results.

Best practices

Keep titles concise (50-60 characters), descriptive, and unique for every page on a site, often following a pattern like "Page Name - Site Name".

Example 1 (html)
<head>
  <title>Contact Us - MyCompany</title>
</head>
Output
(tab shows: Contact Us - MyCompany)

A descriptive, page-specific title aids both users and search engines.

Example 2 (html)
<title>Home</title>
Output
(tab shows: Home)

A minimal but valid title tag; ideally more descriptive in production.

Key points

  • <title> must be inside <head>.
  • Displayed in the browser tab and bookmarks.
  • Heavily used by search engines for SEO ranking and display.
  • Should be concise, unique, and descriptive per page.
πŸ’‘ Note: Every HTML page should have exactly one <title> tag.

πŸ“ Quick Quiz

1. Where must the <title> tag be placed?

2. Why is the title tag important for SEO?

3. How many title tags should a page have?