Plan, Organize and Polish Your Site
Plan a small multi-page site, keep files in a tidy folder structure, add a shared navigation bar and check your work with validators and real devices.
Welcome back!
Step 1 of 12Learn
Plan before you code
Noah opened his editor, typed <h1>Noah's Site</h1>, and then stared at the screen for twenty minutes. He knew HTML. What he didn't know was what his site was for.
Professional teams start every site with three questions, and they work just as well for a first project:
- Who is it for? Friends, a teacher, future employers, a club's members?
- What should they do or learn? See your art, find meeting times, read your reviews, contact you?
- What pages does that need? Write a list before touching code.
A typical first portfolio needs only three or four pages: Home (who you are, in two sentences, plus your best work), Projects (a card for each project with a picture and a short description), About (a bit more about you and your interests) and maybe Contact.
Then sketch each page on paper: boxes for the header, navigation, main content and footer. Sketching takes five minutes and saves hours, because moving a box on paper is free, while moving it in code means rewriting CSS.
Keep the first version small. A finished three-page site you can share beats an unfinished ten-page plan every time. You can always add pages later.
Step 2 of 12Practice · Put in order
Put these stages of making a site in a sensible order.
Drag the items, or use the arrow buttons, to put them in order.
- Sketch the layout of each page on paper
- Add CSS for colors, spacing and layout
- List the pages the site needs
- Decide who the site is for and what they should do there
- Test on a phone and a laptop, then publish
- Write the HTML content for each page
Step 3 of 12Diagram
From idea to live site
Tap a shape with to see more.
- Purpose and audience
- List the pages
- Sketch layouts
Paper is fine.
- Write HTML
- Add CSS
- Test on phone and laptop
- Publish
Step 4 of 12Learn
A folder structure that scales
As your site grows, a tidy folder saves you from broken links and lost files. Here's a structure used, with small variations, by countless real sites:
my-portfolio/
index.html
projects.html
about.html
css/
style.css
js/
script.js
images/
robot.jpg
volcano.jpgHTML pages sit at the top level so their addresses stay short. Supporting files live in folders by type. Every page links the same style sheet with <link rel="stylesheet" href="css/style.css">, so the whole site shares one look.
Shared navigation. Each page should have the same <nav> at the top, linking to every other page. With plain HTML, that means copying the nav block into each file. When you add a page, update the nav in every file. Tedious? A little, and it's one of the reasons people later learn tools that generate pages from templates, but for three or four pages it's perfectly manageable.
A nice touch is showing visitors which page they're on, for example by adding class="current" to that page's link and styling .current in a different color.
Step 5 of 12Practice · Diagram
A folder structure that scales
Tap the one file every page should link to for a shared look.
Tap the shape that answers the question, then press Check.
- my-portfolio/
- index.html
- projects.html
- about.html
- css/
- js/
- images/
- style.css
Linked from every page.
- script.js
- robot.jpg
Step 6 of 12Practice · Select all that apply
Which of these file names are safe to use on a website? Select all that apply.
Select all that apply.
Step 7 of 12Tap to reveal
The pre-launch checklist
Validate your HTML
The free W3C Markup Validation Service checks your HTML for unclosed tags, misspelled attributes and nesting errors. Paste in your code or upload the file, and fix errors from the top down, since one mistake can cause several messages.
Click every link
Open each page and click every link and button. A broken link is the fastest way to make a site feel abandoned.
Test on a real phone
Device mode in developer tools is helpful, but nothing beats opening the site on an actual phone. Check that text is readable without zooming and nothing scrolls sideways.
Check accessibility basics
Every image has alt text, headings follow a logical order, text contrast is strong and you can reach every link using only the Tab key on the keyboard.
Proofread
Read every page out loud. Typos in a portfolio stand out to teachers and employers far more than a plain design does.
Step 8 of 12Practice · Spot the mistake
Noah ran a quick review of his projects page. Which lines describe problems he should fix before publishing?
Step 9 of 12Note
Step 10 of 12Practice · Chart
Noah's first Lighthouse report
Tap the area Noah should work on first.
Tap the bar that answers the question, then press Check.
Step 11 of 12Practice · True or false
If your page looks correct in your browser, it must contain valid HTML.
Step 12 of 12Practice · Choose one
Noah adds a fourth page, gallery.html, to his three-page site built with plain HTML. What else must he do so visitors can find it?
Lesson complete!