Skip to content
Learn Netverks

Lesson

Step 6/58 10% through track

headings

Headings and sections

Last reviewed Jun 1, 2026 Content v20260601
Track mode
iframe_html
Means
HTML preview sandbox
Reading
~3 min
Level
advanced

This lesson

This lesson teaches Headings and sections—the ideas, syntax, and habits you need before moving on in HTML.

Without a solid grasp of Headings and sections, you will repeat mistakes in HTML exercises and on real pages or scripts.

You will apply Headings and sections in contexts like: Websites, hybrid apps, email templates, design systems, and CMS-driven content.

Read the lesson, edit HTML/CSS in the playground, press Run to preview, then answer the lesson MCQs. Also use the HTML reference desk when you need tag or attribute lookup.

When intermediate lessons feel comfortable and you are ready for production-style trade-offs.

Heading elements <h1><h6> define an outline of your document. They are not chosen for font size—that is CSS—they communicate structure to humans, search engines, and assistive technologies.

Recommended outline habits

  • Use exactly one h1 for the primary topic of the page in typical articles.
  • Descend levels logically: h2 for major sections, h3 for subsections—avoid jumping from h2 to h4 unless the outline truly skips a level.
  • Do not pick heading levels for visual size; style headings with CSS.

Screen reader and keyboard navigation

Many assistive tech users browse by headings list. Predictable ordering speeds orientation; chaotic ordering feels like a broken table of contents.

Example outline

<h1>Shipping policy</h1>
<h2>Domestic orders</h2>
<p>…</p>
<h3>Expedited handling</h3>
<p>…</p>
<h2>International orders</h2>
<p>…</p>

Rendered output (sizes via CSS—you would style real h1h3 the same way)

Shipping policy
Domestic orders

Standard delivery timelines and packaging.

Expedited handling

Cut-off times and surcharges.

International orders

Customs and duties disclaimer.

In your own pages, use actual <h1><h3> elements (this box uses styled divs so the lesson page keeps a single logical outline).

Sectioning elements vs headings alone

Wrap thematic groups in section or article when it clarifies boundaries; headings still announce structure inside those containers.

Anti-patterns

  • Multiple h1 elements per page without a strong editorial reason.
  • Using heading tags solely to bold lines of UI chrome.
  • Skipping heading levels purely for spacing—adjust margins with CSS instead.

Patterns that confuse assistive tech (even if visuals look fine)

  • Headings used only inside cards without a sectional outline—listeners lose “where am I?” context.
  • Landmarks duplicated without labels—navigation regions should have aria-label or headings when you have multiple navs.
  • Single-page apps reusing heading levels incorrectly after route changes—treat transitions like new documents mentally.

SEO without cargo-cult rules

Algorithms shift, but coherent outlines, descriptive titles in <title>, unique link text, and fast-loading semantic pages remain durable investments—none of those are satisfied by cramming unrelated keywords.

Important interview questions and answers

  1. Q: What is the purpose of ``?
    A: It forces standards mode so browsers use modern layout/parsing behavior instead of legacy quirks mode.
  2. Q: Why is semantic HTML important in interviews and production?
    A: It improves accessibility, SEO, maintainability, and reduces ARIA/JS work by using native element behavior.
  3. Q: What is the difference between `head` and `body`?
    A: `head` stores metadata/resources for the document, while `body` contains user-visible content.

Pitfall: Skipping levels (h1h4) confuses screen-reader outlines.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs in your browser in a sandboxed frame. Backend runners appear when this track’s profile allows them.

Check yourself

Multiple choice — immediate feedback.

Community stories on this track

Learner essays linked to HTML — not official lesson content.

Browse all stories

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • What confused you about this lesson?
  • How would you explain this to a teammate in 30 seconds?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump