HTML document and meta · 2 / 8
lesson 2

Title and description

What search engines and humans both read first — and the small writing choices that move click-through.

~ 14 min read·lesson 2 of 8
0 / 8

A search result is a small piece of text on a long page. The user is scanning for the link that fits their query. Two pieces of HTML — <title> and <meta name="description"> — decide what shows up in that scan.

These are also what shows in the browser tab, what gets bookmarked, and what social platforms fall back to when you have not added Open Graph (lesson 3). Get them right and your page is recognized; get them wrong and your page is one of ten blue links nobody clicks.

The title element

<title> is mandatory. Every HTML document has one. It is shown:

  • In the browser tab.
  • In the bookmark name when the user saves the page.
  • In Google search results as the big blue link.
  • In OS app switchers and system search.
  • As the fallback Open Graph title (when no og:title is set).
title.html
<title>Sourdough season is back · Daily Bread Bakery</title>

That is the entire syntax. Plain text, inside the <title> tag, in the head. No HTML allowed inside (entities like &amp; work; tags do not).

The title applies to the page, not to the site. A blog has a different title for each post; a docs site has a different title for each article. A title that is the same on every page tells search engines the pages are duplicates of each other.

Watch out

Don't put the same site name in front of every title (or do it carefully). "Daily Bread Bakery — Home" and "Daily Bread Bakery — About" both lead with the same words; in a Google result, the unique part of the title can get cut off. Lead with the page-specific text and put the site name at the end: "About · Daily Bread Bakery".

Writing a good title

A search result title has two jobs: tell the user what the page is, and earn the click. A few rules.

Lead with the page topic, not the site name. "Sourdough season is back · Daily Bread Bakery" beats "Daily Bread Bakery: Sourdough season is back". The unique words come first; the site name is suffix.

Aim for 50-60 characters. Google shows roughly 600 pixels of title text, which works out to about 50-60 characters in most fonts. Longer titles get truncated with an ellipsis.

Use a separator the user expects. ·, , |, are all common. Pick one and be consistent across the site.

Match the user's mental search. If someone types "sourdough recipe" and your page is exactly that, the word "recipe" should appear in the title. Plain language beats clever phrasing.

A few common patterns:

title-patterns.html
<!-- Article: page topic + site name -->
<title>How sourdough fermentation works · Daily Bread Bakery</title>

<!-- Product: name + variant + brand -->
<title>Banneton, 9-inch round — Daily Bread Supply</title>

<!-- Documentation: feature + section + project -->
<title>useState hook · Hooks · React docs</title>

<!-- Search results: query + count + site -->
<title>Sourdough recipes — 27 results · Daily Bread Bakery</title>

Each pattern leads with the most specific information and trails with context. The user scanning a result page sees the unique part first.

check your understanding
You write all 200 of your blog post pages with the title <title>Daily Bread Bakery</title>. What's the most likely consequence?

The meta description

<meta name="description"> is the snippet of text shown under the title in search results. It does not directly affect ranking. But it heavily affects click-through — a clear, action-oriented description gets more clicks than a vague one.

description.html
<meta name="description"
content="Our wild-yeast sourdough loaf returns next Friday. Reserve online or learn how the 24-hour starter works.">

The browser does not render the description anywhere visible — it lives only in the head. The audience is search engines and social-share crawlers.

A few rules:

Aim for 150-160 characters. Google shows roughly 920 pixels — about 150 characters. Longer descriptions are truncated.

One or two sentences. Long enough to set up the value of the page; short enough to read in a glance.

Lead with the user's payoff. "Reserve a loaf for Friday" beats "Daily Bread Bakery is pleased to announce that...". Skip the throat-clearing.

Make every page's description different. Same advice as the title — duplicate descriptions across pages send a duplicate-content signal.

Don't stuff keywords. "Sourdough sourdough recipes sourdough bread sourdough starter" reads like spam to humans and to ranking algorithms. Write the description for a person.

good-vs-bad.html
<!-- vague, hedged, throat-clearing -->
<meta name="description"
content="Welcome to our website! We are pleased to share information about our products and services.">

<!-- specific, action-oriented, person-shaped -->
<meta name="description"
content="Hand-laminated croissants baked daily at 7am. Pre-order whole batches for delivery, or visit the Bridge Street shop on weekends.">

The second describes what the user gets and how to act on it. The first could apply to any business in any industry.

If you skip the description, Google generates one from the page content automatically. Sometimes that works; usually it pulls a less-than-ideal sentence. Writing one yourself is one of the cheapest UX wins on the page.

Tip

Search Console shows how Google actually displays your title and description for each page in real results. Sometimes Google rewrites either one if it thinks your version does not match the query. Treat your title and description as your preferred presentation, not the guaranteed one.

check your understanding
Your meta description is "Daily Bread Bakery is the best bakery in town. We have bread, pastries, coffee, and more. Visit us today." Search-result click-through is low. What's the most likely fix?

When you want neither

Sometimes a page should not be indexed at all — a private dashboard, a thank-you page, a draft. The robots meta tag tells search engines what to do.

noindex.html
<meta name="robots" content="noindex, nofollow">

noindex says "do not include this page in search results". nofollow says "do not follow the links on this page either". You can use one or both.

A common pairing: noindex, follow — keep the page out of results but follow its links to discover other pages.

thank-you-page.html
<head>
<title>Thanks for ordering</title>
<meta name="robots" content="noindex">
</head>

The thank-you page after a checkout is a good noindex candidate — there is no value in someone arriving at it from a search. Search Console will list any page Google still tries to index against your wishes.

The robots tag is covered in more depth in lesson 7 of this course (canonical, robots, hreflang).

check your understanding
Your account dashboard is at /account. You don't want it to appear in Google. The smallest correct change is:
check your understanding
Two pages on your site have identical <title> and <meta name="description">. They have different content. What does Google likely do?
check your understanding
You write a 240-character description for one of your pages. Google shows a truncated version in results. What's the right takeaway?
← prevnext lesson →
KeepLearningcertificate
for completing
HTML document and meta
0 of 8 read