Sub topic 6
Writing the h1
This chapter assumes you know basic HTML structure (head, body, common tags), what a search results page looks like, and what a target keyword is. By now you have chosen a keyword and written a title tag. The h1 comes next.
What the h1 does
The h1 is the main visible heading on the page. The title tag appears in search results and browser tabs. The h1 appears at the top of the page content, after the visitor has clicked. It confirms that the visitor landed in the right place.
Search engines read both. When the h1 and the title describe the same topic, the page's subject is clear. They do not need to match word for word.
| Element | Where readers see it | Main job |
|---|---|---|
| `title` | Search results, browser tab, bookmarks | Win the click |
| `h1` | Top of the page body | Confirm the topic and orient the reader |
Rules for a good h1
- Use one h1 per page. HTML permits more than one, but a single h1 gives readers, screen readers and crawlers one clear statement of the topic.
- Include the target keyword, or a close natural form of it.
- Describe this page specifically. "Snake Plant" is a topic. "How to Repot a Snake Plant" says what the page does.
- Match the search intent. If people searching "repot a snake plant" want instructions, the h1 should promise instructions.
- Write it for people first. It can be longer and more conversational than the title, because it is not cut off in search results.
Title and h1 working together
Both should serve the same keyword and intent. They can differ in wording to fit their jobs.
<head>
<title>How to Repot a Snake Plant: Step-by-Step Guide</title>
</head>
<body>
<h1>How to Repot a Snake Plant</h1>
</body>The title adds "Step-by-Step Guide" to attract the click. The h1 is the plain statement of the topic. The two stay consistent without being identical copies.
Compare the weak version from earlier in this tutorial:
<title>Snake plant | snake plant repotting | repot snake plant | best snake plant</title>
<h1>Snake Plant</h1>The h1 is vague. It does not say whether the page is a care guide, a product page or an encyclopedia entry, and it leaves out the action the searcher wants.
Common mistakes
- No h1. Some templates style a
divto look like a heading. Crawlers and screen readers then find no main heading. Use a realh1element. - Multiple h1 elements. Themes sometimes make the site name or a sidebar widget an h1. Reserve the h1 for the page topic.
- The logo as the h1. If the site logo is wrapped in an h1 on every page, all pages share the same h1. Use a plain link or
divfor the logo on inner pages. - A duplicate of the title, keyword-packed. Repeating "snake plant" three times in the h1 adds nothing. One natural use is enough.
- A marketing slogan. "Green Thumbs Start Here" is clever but gives no topic information.
Check your own h1
A quick test: cover the title and read only the h1. Can a stranger tell what the page is about and what they will get? If so, the h1 works.
Then check that the h1 and the title share the same keyword and the same intent. If the title promises a "step-by-step guide" and the h1 reads "Snake Plant Care Overview", the mismatch can confuse visitors who arrive expecting a guide.
<!-- Before -->
<div class="big-heading">Snake Plant</div>
<!-- After -->
<h1>How to Repot a Snake Plant</h1>Exercise
A page about repotting a snake plant has the h1 "Plants" and a title "How to Repot a Snake Plant: Step-by-Step Guide". Name two problems with the h1 and write a better one.
Show answer
The h1 is vague, since it does not say what the page covers. It also lacks the target keyword and does not match the intent in the title (instructions for repotting). A better h1 is "How to Repot a Snake Plant".
Exercise
A site theme wraps the site name in an h1 on every page, and each article title is an h2. What is the effect, and how would you fix it?
Show answer
Every page shares the same h1, so the h1 no longer describes the individual page. Change the site name to a non-heading element on inner pages and make each article's title the h1.