Skip to content
techskilldaily.
The archiveNo. 015
Understand the web

A heading does more than look big.

Use HTML headings to give a short page a readable structure.

2 min read 5 min to try
MAKE ROOM FORoneSMALL SKILL

Tell the browser what each piece means.

A page can have a title, section names, and ordinary paragraphs. Making some text larger may suggest that structure visually, but an HTML heading states it directly. An h1 marks a top-level heading; h2 marks a section beneath it.

In the example, the page is about a weekend walk. “What to bring” is one section of that page, so it uses h2. The sentence underneath is a paragraph. The tags describe each piece’s role rather than a specific font size.

A tiny page outline

Main heading

Weekend walk

Sections

What to bring Where to meet

Heading levels describe a hierarchy.

Outline the content before decorating it.

For this small page, use one h1 and an h2 for each main section. Someone scanning the headings should get a useful outline. “What to bring” and “Where to meet” communicate more than “Section 1” and “Section 2.”

Save the example as walk.html using a plain-text editor, then open it in a browser. You are making a local practice page. Editing the file changes your copy, not an existing website. Refresh the browser after saving your next edit.

A small example to try
<!doctype html>
<html lang="en"><meta charset="utf-8"><title>Weekend walk</title>
<h1>Weekend walk</h1>
<h2>What to bring</h2>
<p>Bring water and a light jacket.</p>
</html>
Your turn 5 minutes

Make it yours.

  1. Save the example as walk.html in a practice folder.
  2. Open the file in a browser.
  3. Add an h2 called Where to meet and a paragraph with a fictional meeting place.

What changed when you tried it?

A little nudge

Use a plain-text editor so the saved file contains HTML, not word-processor formatting.

What to look for

The browser shows one main heading and two smaller section headings, each followed by its paragraph.

Take it one small step further

Read only the headings and see whether they explain the page’s organization.

Keep this bit

Use headings to describe structure, then style them.

Read more: MDN · Basic HTML syntax ↗

No submission needed. This one is just for you.

Another spark of curiosityTake a filename apart.