Sub topic 2
Length and Truncation in Search Results
Assume you know basic HTML, what a search engine results page looks like, and what a keyword or search query is. This chapter explains how to make a title and heading structure clear for both searchers and search engines.
Length and truncation in search results
A page title is the text inside the HTML <title> element. Search engines often use it as the clickable result title. It also helps them identify the page topic.
Search results do not have a fixed character limit. Titles are displayed within a pixel width, so long words, capital letters, and different devices affect truncation. Treat about 50–60 characters as a practical starting point, not a guarantee.
Put the primary keyword near the beginning when it fits naturally. Then describe the page's purpose or benefit. Make each title unique and accurate.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>How to Repot a Snake Plant: Step-by-Step Guide</title>
<meta name="description"
content="Learn when and how to repot a snake plant, which pot and soil to use, and how to avoid root damage.">
</head>
<body>
<h1>How to Repot a Snake Plant</h1>
</body>
</html>Search engines can rewrite titles
A search engine may replace or shorten your title when it seems inaccurate, repetitive, too long, or poorly matched to the page content. You cannot control the final displayed text completely. You can reduce rewrites by keeping the title specific, readable, and consistent with the page's main heading.
> callout note > Write for the searcher first. A short, clear title is more useful than one that repeats the keyword several times.
Writing the h1
The <h1> is the visible main heading of the page. It tells readers what the page is about after they open it. Use one clear h1 for the page's primary topic.
The h1 and title do not need to be identical. The title can be written for a search result, while the h1 can give the page a natural introduction. Their topics should agree.
Building a logical heading hierarchy
Use headings to create an outline:
- Use
h1for the page topic. - Use
h2for major sections. - Use
h3for subsections inside anh2. - Use deeper levels only when the content has another real level.
Do not choose a heading level because it looks larger. Use CSS for appearance. A logical hierarchy helps readers scan the page and helps screen reader users navigate it.
Exercise
A page uses the title “Snake Plant | Snake Plant Repotting | Best Snake Plant” and starts with an h1 of “Snake Plant.” What should you revise first?
Show answer
Replace the repeated title with a specific, readable title that matches the page intent. Then make the h1 describe the page's actual task, such as “How to Repot a Snake Plant,” and add ordered h2 sections.