topskill.dev
CoursesTracks
0
All courses/Introduction to HTMLHeading Hierarchy: H1 and H2
Text Content
1 / 8
← Introduction to HTML
○What Is HTML? See Tags in Action○Build the Meridian Signal○Complete HTML5 Page Structure○Build a Complete HTML5 Page✦Module Quiz
●Heading Hierarchy: H1 and H2○Extend the Signal Brief○Paragraphs and Inline Tags○Write Meridian's Survey Notes○List Types: Steps, Items, and Terms○Build a Crew Member Loadout○Challenge: Transmit a Rescue Signal✦Module Quiz
○Hyperlinks○Links between project files○Images○Applying Styles to HTML✦Module Quiz
○Div and Span○HTML Tables○Classes and IDs○Review: Structured Profile✦Module Quiz
○Project 1 - Visiting Card Structure○Project 1 - Visiting Card Actions✦Module Quiz
○The Head Element and Page Title○Meta Tags○HTML Entities✦Module Quiz
○Form Basics: Join the Meridian Relay○Build a Night-Shift Check-In○Input Types: Build a Mission Profile○Record Beacon Maintenance○Choice Controls: Select Training Modes○Plan a Supply Pickup○Response Controls: Send a Mission Reply○Build a Rescue Dispatch Report○Form validation and submission○Challenge: Send an Emergency Beacon✦Module Quiz
○Project 2 - Contact Us Form Structure○Project 2 - Contact Us Form Actions✦Module Quiz
○Embedding Video○Embedding Audio○Iframes✦Module Quiz
○Semantic HTML Tags○Details, Figure, and Figcaption○A keyboard-friendly page✦Module Quiz
○Project 3 - Resume Semantic Structure○Project 3 - Resume Links and Actions✦Module Quiz

Heading Hierarchy: H1 and H2

Heading hierarchy: a page outline

The Meridian signal brief has one page title and two sections. Run the completed index.html and match its <h1> and <h2> tags to the headings in the preview.

html
<h1>Meridian's Signal Brief</h1>
<h2>Power online: Beacon sight</h2>
<p>The crew can spot a rescue signal above the city skyline.</p>
<h2>Next mission</h2>

Use <h1> for this page's main heading and <h2> for each major section. HTML has six heading levels, <h1> through <h6>. Each higher number represents a deeper subsection, not a request for a particular font size.

For example, a field guide might have <h2>Forest</h2>, then <h3>Birds</h3>, then <h4>Owls</h4>. These headings are siblings in the HTML source, but their levels express an outline. Do not put one heading element inside another.

Compare in the preview

In the editor, change the first <h2> to <h3> in both its opening and closing tags. Run again, observe the default size change, then restore it. Choose heading levels for their place in the outline; CSS can change their size later.

The next exercise explores all six levels with a new signal. Real pages rarely need all six; use only the depth your content needs.

Files
  • ⋄index.html
Loading editor…