One page is a start. A real website has several pages and a menu to move between them. Today your site grows!
About 45 minutes. You can stop and come back. Your answers are saved in this browser.
Last time you styled your site with CSS. Let's warm up!
Each page of your website is its own .html file, all saved in the same folder. They can all share one style.css, so every page looks the same.
A link uses the <a> tag. The href is the filename of the page to go to:
<a href="about.html">About me</a>
A menu (also called navigation) is a group of links inside a <nav> tag. Put the same menu on every page, so people can always get anywhere.
<nav class="menu">
<a href="index.html">Home</a>
<a href="about.html">About me</a>
<a href="gallery.html">Gallery</a>
</nav>
CSS: put the links in a row.menu {
display: flex;
gap: 16px;
flex-wrap: wrap;
}
about.html, not About.html.my-pets.html.href must match the filename exactly, letter for letter.A chain from Prompt Pro, Lesson 5! Small steps, and "don't change anything else" stops the AI from rewriting the parts you already made.
<a href="about-me.html">About me</a>
Clicking this shows an error page, because there's no file called about-me.html. The file is about.html. Fix the href (or rename the file) so they match exactly.
.page {
width: 1000px;
}
On a phone, this page is too wide, and you'd have to scroll sideways. Here's the fix:
Fix part 1: in the head of every page<meta name="viewport" content="width=device-width, initial-scale=1">
Fix part 2: in style.css.page {
max-width: 1000px;
}
img {
max-width: 100%;
height: auto;
}
The meta line goes in the <head> and tells phones to use their real width. max-width means "up to this wide, but you can shrink." To test, make your browser window really narrow and check nothing gets cut off.
A menu link to another website (one starting with https://) is a Code Check moment. Only add outside links with a grown-up's OK. Your own pages are always fine!
Look at the files in the folder, then decide if the link will work.
This menu is broken! The folder has three pages: index.html, about.html and gallery.html. Fix the links and add the missing one. (Links don't open in the playground. Just get the code right!)
The playground only runs inside this page. It can't open other websites or change anything on your computer. Your code is saved in this browser, on this device.
Time to use your own chatbot. Missions get harder as you go. Bronze is the one to do today. Silver and Gold are extra challenges for when you want more.
Grow your site to two pages.
about.html) in your folder. A chain prompt like Example 1 can help.style.css on both.Make it a real multi-page website.
Make your site work on a narrow screen.
meta line to the head of every page.max-width (or ask AI to explain how, and Code Check its answer).Your notes are saved right in this browser, on this device. They're never sent anywhere.
Add today's page to your Build Log.
Your Build Log is saved right in this browser, on this device. It's never sent anywhere.
.html file in the same folder, and they can share one style.css.<a href="about.html">. The href must match the filename exactly.<nav>) on every page.max-width, and test with a narrow window.10 questions, picked at random from a bigger question bank. If you take it again, you'll probably see a different mix. Let's go!
Add buttons that actually do things, with JavaScript.