Find a course

Module 5: Finish and PublishLesson 10 of 1112 min

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.

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:

  1. Who is it for? Friends, a teacher, future employers, a club's members?
  2. What should they do or learn? See your art, find meeting times, read your reviews, contact you?
  3. 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.

  1. Sketch the layout of each page on paper
  2. Add CSS for colors, spacing and layout
  3. List the pages the site needs
  4. Decide who the site is for and what they should do there
  5. Test on a phone and a laptop, then publish
  6. Write the HTML content for each page

Step 3 of 12Diagram

From idea to live site

From idea to live siteProcess diagram: Purpose and audience → List the pages → Sketch layouts → Write HTML → Add CSS → Test on phone and laptop → Publish.Purpose andaudienceList the pagesSketchlayoutsWrite HTMLAdd CSSTest on phoneand laptopPublish

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.jpg

HTML 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.

A folder structure that scalesHierarchy diagram: my-portfolio/, index.html, projects.html, about.html, css/, js/, images/, style.css, script.js, robot.jpg.my-portfolio/index.htmlprojects.htmlabout.htmlcss/style.cssjs/script.jsimages/robot.jpg
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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

Noah's first Lighthouse reportBar chart with 4 categories: Performance: 72; Accessibility: 58; Best practices: 92; SEO: 83.020406080100PerformanceAccessibilityBest practicesSEO72589283
Illustrative scores for a beginner page with large images and missing alt text.
Noah's first Lighthouse report
ItemScore
Performance72
Accessibility58
Best practices92
SEO83

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?