Your garden pages now link to each other across two folders, but each one still consists of a heading and a run of paragraphs. Rosa wants an about page with the garden’s rules and what’s in the tool shed, and that text has sections inside sections, rules that come in order, and tools that form a set.
In this lesson, you’ll add headings that form an outline and lists where the text is a list. You’ll choose each element for what the text is rather than how it looks. The browser’s default styles will show the difference, but they aren’t the reason for your choice. Start with the page’s outline.
Outline the Page With Headings
A page with several topics needs signposts, and in HTML they are headings. There are six levels, <h1> to <h6>, and together they form the page’s outline, a nested structure like a table of contents. The <h1> names the whole page, so a page has one. Each <h2> starts a section, and an <h3> starts a subsection within the section headed by the <h2> above it.
In your garden/ folder, create about.html with Rosa’s text so far. The rules and the shed’s contents stay plain paragraphs for now:
about.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>About | Elm Street Community Garden</title>
</head>
<body>
<main>
<h1>About the Garden</h1>
<p>Neighbors grow vegetables, herbs and flowers on 24 plots.</p>
<h2>Garden Rules</h2>
<p>Close the gate behind you.</p>
<p>Water your plot at least twice a week.</p>
<p>Put every tool back in the shed.</p>
<h2>The Tool Shed</h2>
<h3>What's in the Shed</h3>
<p>Spades, rakes, watering cans and a wheelbarrow.</p>
</main>
</body>
</html>
Save, and change the end of your preview’s address to /about.html, for example, http://127.0.0.1:3000/about.html. The browser displays each heading level smaller than the one above it. Chrome’s defaults are 32 pixels for <h1>, 24 for <h2>, and 18.72 for <h3>.
The page looks like this: