CHAPTER 08 · HTML
Headings: organise a page so readers can find their way
A heading tells readers what the following content is about. In this chapter, you will choose heading levels by the organisation of the information, not by guessing which font size looks best. You will practise both a realistic page outline and the six available levels.
Download example files (ZIP)What you will learn
Use h1 through h6 and understand their levels. Build a main topic, sections and subsections. Distinguish a document title, a heading and a bold sentence. Recognise the value of headings for readers and assistive tools. Check an outline before adding visual design.
Think of a course notebook
Write the heading syntax
<h1>Campus learning fair</h1>
<h2>Morning sessions</h2>
<h3>Writing your first page</h3><h> element that automatically chooses a level, and <h7> is not a seventh standard heading level. Keep the heading inside body, not head.
Choose the level from the content
h1 Campus learning fair
h2 Morning sessions
h3 First web page
h3 Organising practice files
h2 Afternoon sessions- 1h1: one page topic
- 2h2: a major section
- 3h3: a real subsection
- 4Another h2: a parallel major section
A heading level describes the content structure. It does not promise a fixed font size or search ranking.
Complete example: a clear event outline
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Campus Learning Fair Sessions</title>
</head>
<body>
<h1>Campus learning fair</h1>
<p>Choose a session that matches your current practice.</p>
<h2>Morning sessions</h2>
<h3>First web page</h3>
<p>Write and check a small HTML notice.</p>
<h3>Organising practice files</h3>
<p>Keep each task in a clearly named folder.</p>
<h2>Afternoon sessions</h2>
<p>Explain your page to a partner and compare your results.</p>
</body>
</html>This preview shows the example in a browser. Save the complete code in local files to test links between pages and downloads. Same-page section links work here.
A second example: recognise all six levels
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Six Heading Levels</title>
</head>
<body>
<h1>Learning handbook</h1>
<h2>Web development</h2>
<h3>HTML</h3>
<h4>Text content</h4>
<h5>Heading practice</h5>
<h6>Final outline check</h6>
<p>Each deeper heading belongs under the topic above it.</p>
</body>
</html>This preview shows the example in a browser. Save the complete code in local files to test links between pages and downloads. Same-page section links work here.
Title, heading and bold text are different
<p><strong>Morning sessions</strong></p> is a paragraph with important text, not an h2. If the text introduces a section, use the appropriate heading element.
How headings help different readers
One clear main heading as a beginner convention
Problem and solution: all headings use h3
Common mistakes and useful tips
Choosing a level only by font size: level describes organisation. Writing <h>or<h7>: use the six standard heading levels.Increasing the number for every heading: sibling sections can repeat the same level. Skipping levels to obtain a smaller appearance: use a sensible sequence and adjust appearance with CSS. Using a bold paragraph instead of a real section heading: visual similarity does not supply heading semantics. Adding headings without useful text beneath them: each should introduce a real topic. Treating one-h1 guidance as a universal parsing rule: distinguish an authoring recommendation from what browsers can parse.
Practice questions
Which level would you normally use for the main heading of our simple standalone pages? A page has two main sections, Getting ready and Practice tasks. Should the second automatically become h3? Why is h1 followed immediately by h4 usually a poor choice when the goal is only a smaller font? Is <p><strong>Practice tasks</strong></p>the same as an h2?Read the learning-fair example and list the two h3 subsection names. Write an outline for a college-club page with a main heading, two main sections and two subsections within the first section. Then turn it into a complete HTML file.
Check your practice answers
H1, with a meaningful title for the page's main topic. No. Both are parallel main sections, so h2 is appropriate for both. The level jump gives a confusing content hierarchy. Use the correct level and change font size through CSS when needed. No. It is an important phrase inside a paragraph, not a heading element. First web page and Organising practice files. For example, use h1 for the club, h2 for Activities and Joining, and h3 for Workshops and Study circles within Activities. Add meaningful supporting paragraphs rather than headings alone.
Interview questions
What is the purpose of heading levels?
Why are real heading elements useful for accessibility?
Can the same heading level appear several times?
Does changing an h3 to a large font make it an h1?
Quick revision
HTML provides h1 through h6. Choose levels from the content hierarchy. Repeat levels for sibling topics and move deeper for real subdivisions. Title, headings and important paragraph text serve different roles. A clear outline helps people and tools navigate. Use CSS later for appearance; do not misuse heading levels for sizing.