Sub topic 4
Headings That Match the Questions People Ask
This chapter assumes you know basic HTML headings, paragraphs, lists, and tables. You should also have experience editing web content and understand how search engines display results.
AI answer systems often begin with a question, then retrieve passages that appear to answer it. A heading helps define the subject of the passages below it. A question-led heading makes that subject explicit:
> What is a canonical URL?
A descriptive heading can work too:
> Canonical URLs for duplicate pages
The best heading depends on the language your readers use. Use a question when the section answers a specific question. Use a descriptive heading when the section explains a broader topic or process.
Start with the reader's actual question
Before writing a heading, identify the task behind the search. “Caching” is a topic, not a complete question. A reader might really ask:
- How long should I cache API responses?
- What happens when cached data becomes stale?
- How do I clear a cache after a deployment?
These questions require different answers. A section with the heading How long should I cache API responses? gives both readers and retrieval systems a precise target.
Put the direct answer in the first one or two sentences below the heading. Add context, examples, and exceptions afterward.
<section>
<h2>How long should I cache API responses?</h2>
<p>Cache API responses for as long as the data can be stale without harming users. For data that changes a few times a day, start with a time-to-live (TTL) of 5 to 15 minutes.</p>
<p>Use a shorter TTL for prices or inventory, and a longer TTL for documentation that changes rarely.</p>
</section>A time-to-live, or TTL, is the period before a cached item expires. Defining the term in the passage keeps the answer understandable if a system retrieves only that section.
Make each heading describe one answer
A heading should promise one clear subject. Avoid headings that combine unrelated questions:
- Caching and API security
- Canonical URLs, redirects, and site speed
- Everything about search indexing
These headings create broad sections that are difficult to retrieve accurately. Split them into focused sections instead:
- How long should I cache API responses?
- How do redirects affect canonical URLs?
- How can I check whether a page is indexed?
Use a consistent heading hierarchy. The page title uses h1. Major questions use h2. Supporting questions use h3. Do not choose a heading level only because it looks larger. CSS should control appearance; heading levels should show structure.
Match wording without copying every query
People ask the same question in many ways. One page does not need a separate heading for every variation. Choose the clearest version and include natural alternatives in the opening paragraph.
For example, How do I make a page canonical? can cover searches such as “set a canonical URL” and “tell Google which duplicate page to use.” The paragraph can mention those terms while keeping one focused section.
Avoid vague headings such as Best practices or Important information. They force readers and systems to infer the topic from surrounding text. Replace them with a heading that names the decision:
- When should you use a canonical URL?
- Which pages should robots.txt block?
- How often should you review factual claims?
Check the heading and passage together
Read each heading with only the paragraph immediately below it. Ask:
- Does the heading state a real question or a clear subject?
- Does the first sentence answer that question?
- Would the passage still make sense if copied without the rest of the page?
- Does the heading promise more than the passage delivers?
This check catches headings that are attractive but imprecise. It also reveals when one section contains several answers and should be divided.
Exercise
Exercise
Rewrite the heading “Caching” for a section that explains how long a response should remain cached.
Show answer
Use “How long should I cache API responses?” Then begin with the recommended time range and explain how data freshness affects the choice.