The garden’s home page and plots page now link to each other with href values like plots.html. Both files sit side by side in garden/, so that short path is enough. Rosa wants each event on its own page, kept together in an events/ folder.
In this lesson, you’ll move the work day notice into that folder and see what happens to its links. You’ll learn the rule the browser follows to turn an href into an address, so you can predict where any link goes before you click it.
Move the Notice Into a Folder
A site gains folders as it gains pages, and every link in a moved page has to keep working. In VS Code’s Explorer, select garden and click the New Folder icon to create events/.
Then move the notice you wrote in the exercise into it: in the Explorer, drag work-day.html from garden/ onto events/, and confirm if VS Code asks. The file keeps its content, jobs and all, but now lives one folder down.
Open the moved file and give it two links back, in a new paragraph at the end of its <main>. This is a deliberate detour. Write them as you did in the last lesson, since that’s the natural first try. Seeing how the move affects the links helps you understand the rule. If you didn’t keep your page, or you’d rather start from a known version, create events/work-day.html with this one:
events/work-day.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, initial-scale=1">
<title>Work Day | Elm Street Community Garden</title>
</head>
<body>
<main>
<h1>Saturday Work Day</h1>
<p>
Saturday, November 28, from 9 a.m. to noon.
Bring <em>gloves</em>.
</p>
<h2 id="compost">Turn the Compost</h2>
<p class="job">
Mix the three compost bins and water any dry ones.
</p>
<h2 id="mulch">Mulch the Plots</h2>
<p class="job family-friendly">
Spread straw over plots 1 to 12.
Children are welcome.
</p>
<p>
Back to the <a href="index.html">garden's home page</a>
or see <a href="plots.html">who tends each plot</a>.
</p>
</main>
</body>
</html>
Your folder now looks like this:
garden/
│
├── events/
│ └── work-day.html
│
├── index.html
└── plots.html
Save the file, then change the end of your preview’s address in Chrome to /events/work-day.html, for example, http://127.0.0.1:3000/events/work-day.html. Hover over garden’s home page, and Chrome’s status bar at the bottom left shows the address the link leads to.