Build Your Own Web

Build this website with blocks

Try another way to build: snap together HTML, CSS and behavior blocks, change their fields, and watch your website update. Start with this lesson’s project or try a code example below.

Want to keep what you build? Web Studio holds a drawing, blocks and code in one project that you can share on the class site and publish as your own website.

Lesson 2 of the pathway · 50–70 minutes · Needs a working folder from lesson 1

Give the Page Meaning with HTML

HTML is not a way to make text look a certain way. It is a way to say what each piece of your page is. Get that right and the browser, the search engine, the screen reader and your future CSS all know how to treat it.

Today you replace the placeholder paragraph from lesson 1 with a real structure: a header, a navigation bar, a main region with headings, a project list, an image with useful alt text, a table and a form.

Elements and attributes

Almost everything in HTML is an element: an opening tag, some content, and a closing tag.

<p>A paragraph of text.</p>
<a href="pages/about.html">About this project</a>
<img src="images/logo.svg" alt="A hand-drawn rocket">

The word right after < is the element name, and it carries the meaning. Everything else inside the opening tag is an attribute — a name, an equals sign, and a value in quotes — that configures this particular element. href says where a link goes. src says which file an image loads. alt says what the image communicates.

A few elements are void: they hold no content, so they have no closing tag. <img>, <br>, <input> and <meta> are the ones you will meet. Everything else must be closed, and elements must nest cleanly — close the inner one before the outer one, always.

Cover page of Tim Berners-Lee's original 1989 CERN proposal titled Information Management: A Proposal
Tim Berners-Lee's Proposal for the World Wide Web (CERN, 1989) The document that started the web. In March 1989, Tim Berners-Lee circulated this proposal at CERN to connect linked scientific documents across diverse operating systems. Notice his supervisor Mike Sendall's famous pencil annotation at the top: “Vague but exciting...” HTML tags became the open language used to realize this global web. Credit: CERN / Tim Berners-Lee / Wikimedia Commons · Public domain · source
Movable lead type arranged upside-down and backwards in a metal composing stick by a printer
The Historical Origin of “Markup Tags” (Letterpress Composing Stick) Centuries before digital screens, editors and compositors used handwritten “markup” symbols on manuscript copy to instruct printers how to arrange lead type in a composing stick. HTML element tags like <p>, <h1>, and <strong> directly inherited this tradition of separating content from editorial instructions. Credit: Willi Heidelbach / Wikimedia Commons · CC BY-SA 3.0 · source

Write HTML at lightning speed with Emmet in VS Code

You do not need to type every bracket and closing tag by hand. Visual Studio Code comes with Emmet built-in. Type a short abbreviation and press Tab or Enter to expand it into clean HTML instantly:

Instant Emmet expansions for building your site structure
What you wantWhat you type in VS CodeWhat Emmet produces
Accessible Nav Menunav>ul>li*3>aA <nav> wrapping a <ul> with 3 separate <li><a href=""></a></li> items!
3 Project Cardsarticle.card*3>h3+p+aThree <article class="card"> elements, each containing an <h3>, <p>, and <a>.
Page Landmarksheader+main+footerThe three essential root landmarks laid out in sequence.
Wrap SelectionSelect text, press Shift+Alt+WWraps the highlighted words in any tag you specify (e.g. strong, p, or a).

Pro Tip: When you rename an HTML tag in VS Code, install the free Auto Rename Tag extension. Changing <h2> to <h3> will automatically update the matching </h3> tag without you needing to scroll down!

A heading is not big text

There are six heading elements, <h1> through <h6>. It is tempting to choose one by how large it looks. Don't. The number is a level in an outline, exactly like the indentation of a contents page.

<h1>Ada's creation station</h1>
  <h2>Games</h2>
    <h3>Asteroid Sorter</h3>
    <h3>Tide Pool</h3>
  <h2>Simulations</h2>
    <h3>Orbit Sandbox</h3>

Three rules keep an outline honest. One <h1> per page, saying what this page is. Never skip a level going down — an <h2> may be followed by an <h3>, never straight to an <h4>. And never pick a level for its size; if <h2> is too big, that is a job for CSS in the next lesson.

This matters because browsers expose HTML structure directly to assistive technology through an Accessibility Tree. Screen reader users navigate a page by jumping heading to heading with shortcut keys, exactly the way a sighted reader skims visual headlines. When you skip a heading level, you fracture that mental hierarchy; therefore, someone who cannot see the visual layout becomes disoriented because their screen reader reports missing parent sections. An honest outline ensures that every reader can jump directly to what they need in seconds.

Landmarks: the big regions of the page

Four elements divide a page into regions that assistive technology can jump between directly.

The landmark elements you will use on every page
ElementWhat belongs in it
<header>The introductory band at the top: site name, logo, usually the nav.
<nav>A set of major navigation links. Not every group of links needs one.
<main>The unique content of this page. Exactly one per page, and it must not contain the header or footer.
<footer>Closing information: credits, contact, copyright.

If a page has more than one <nav> — say a site menu and a menu of your projects — label them so they can be told apart:

<nav aria-label="Main">
  <ul>
    <li><a href="index.html">Home</a></li>
    <li><a href="pages/about.html">About me</a></li>
    <li><a href="pages/projects.html">Projects</a></li>
  </ul>
</nav>

The links live in a list because that is what they are: a list of destinations. This means a screen reader announces "list, three items", which informs the listener how many options exist before they decide to explore. As a result, landmark elements reduce cognitive load by allowing users to bypass repetitive navigation and jump straight into unique content.

Semantic HTML versus div soup

A <div> is a box with no meaning at all. It is the right choice when you genuinely only need a wrapper for layout. It is the wrong choice when a meaningful element exists. Compare these two pages, which can be styled to look completely identical:

Div soup

<div class="top">
  <div class="big">My site</div>
  <div class="menu">
    <span onclick="go()">Projects</span>
  </div>
</div>
<div class="content">
  <div class="medium">Games</div>
  <div class="row">Tide Pool</div>
</div>

Semantic

<header>
  <h1>My site</h1>
  <nav aria-label="Main">
    <a href="projects.html">Projects</a>
  </nav>
</header>
<main>
  <h2>Games</h2>
  <ul><li>Tide Pool</li></ul>
</main>

The left version has no headings to navigate, no landmarks to skip to, and a "link" that the keyboard cannot reach and that no one can open in a new tab, because a <span> is not a link no matter what you attach to it. Because a span lacks keyboard focus semantics, pressing Tab ignores it entirely; therefore, anyone using a switch control or keyboard is locked out. The right version uses semantic elements, which means the browser automatically provides focus rings, keyboard activation via Enter, and search engine comprehension without writing extra code. That is the whole argument.

Historic front page of The New York Times from April 16, 1912 reporting the sinking of the Titanic
Print Journalism's Semantic Architecture (The New York Times, 1912) Centuries of publication design established clear information hierarchy: the newspaper nameplate is the <header>, the primary headline and multi-column story form the <main> <article>, sidebars and casualty bulletins serve as <aside>, and publication data sits in the <footer>. HTML5 semantic landmarks replicate this proven structural grammar so search engines and assistive technology understand page meaning. Credit: The New York Times / Library of Congress / Wikimedia Commons · Public domain · source
Illustration of Vannevar Bush's conceptual Memex desk with dual projection screens, code book, and levers
Vannevar Bush's Memex: The Concept of Hypertext (1945) In his groundbreaking essay As We May Think, scientist Vannevar Bush envisioned the “Memex”—a mechanized desk storing human records on microfilm linked together by associative index trails. Bush's vision inspired Ted Nelson (who coined “hypertext”) and Tim Berners-Lee to build the World Wide Web, where the <a href="..."> anchor tag turns any text into an associative bridge across human knowledge. Credit: Life Magazine / Alfred D. Crimi / Wikimedia Commons · Public domain · source

The Semantic Trio: <section>, <article>, and <aside>

Inside <main>, you will group content. Three semantic elements give these groups exact meaning:

When to use which container tag
ElementMeaningBest used for
<article>A self-contained item that makes sense even if copied somewhere else completely on its own.A project card, a blog post, a student game review, a customer testimonial.
<section>A thematic chapter or major block of the page that begins with its own heading."About Me", "Featured Creations", "My Skills", "Contact Info".
<aside>Secondary or supporting information tangentially related to the content around it.Author bio sidebar, quick tool tips, related resource links, callout notes.
<section id="creations">
  <h2>Featured Creations</h2>
  <article class="card">
    <h3>Tide Pool Simulator</h3>
    <p>An interactive hydrodynamic wave simulation running on HTML5 Canvas.</p>
    <a href="tide-pool.html">Launch simulation</a>
  </article>
</section>

Links, images, and lists that carry information

Links that make sense out of context

Assistive software can list every link on a page on its own, stripped of the sentences around them. This means a visitor can press a shortcut key to summon a dialog box containing all links on the page. A page filled with "click here", "read more", and "this link" becomes completely unusable in that view, because none of the entries explain where they lead. Therefore, always write the destination directly into the link text so that the action explains itself even when read in isolation.

<!-- Weak -->
<p>To see my physics game, <a href="tide-pool.html">click here</a>.</p>

<!-- Strong -->
<p><a href="tide-pool.html">Play Tide Pool, my water physics game</a>.</p>

Alt text that carries the information

The alt attribute is not a caption and not a filename. Ask: if this image vanished, what would the reader need said instead? Write that.

<!-- Useless -->
<img src="images/chart.png" alt="chart">
<img src="images/chart.png" alt="image of a chart png">

<!-- Useful -->
<img src="images/chart.png"
     alt="Playtest scores rose from 40 to 85 over five rounds."
     loading="lazy" width="640" height="360">

<!-- Purely decorative: empty alt, deliberately -->
<img src="images/swirl.svg" alt="">

Notice loading="lazy": this instructs modern browsers to wait and download the image only when the visitor scrolls near it, saving mobile data. Always include width and height attributes so the browser reserves the exact pixel dimensions before the image arrives, preventing unpleasant layout shifts as the page renders.

Figures with Captions & Rich Media

When an image, diagram, or chart carries educational or narrative weight, wrap it in a <figure> with a <figcaption>. On our class platform, adding data-zoomable enables the click-to-enlarge photo lightbox so the class can examine details together:

<figure data-zoomable>
  <img src="images/my-circuit.jpg" alt="A breadboard circuit with three LEDs wired in parallel" width="800" height="600" loading="lazy">
  <figcaption>
    <strong>Parallel Circuit Prototype</strong>
    Testing resistor values to balance LED brightness before soldering the permanent shield.
  </figcaption>
</figure>

Modern HTML5 also handles audio and video natively without third-party plugins:

<!-- Accessible audio clip with fallback -->
<audio controls src="audio/theme-song.mp3">
  Your browser does not support the audio element.
</audio>

<!-- Accessible video player -->
<video controls width="640" height="360" poster="images/video-cover.jpg">
  <source src="video/demo.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video>

An empty alt="" is a real answer, not a shortcut: it tells a screen reader that an image is decorative, which causes assistive software to skip it quietly. This is much kinder than forcing the listener to hear "swirl dot s v g". Leaving the attribute off entirely is different and worse: because the software has no guidance, it assumes the image might be informative and reads the raw filename aloud, which confuses the listener. Therefore, every <img> gets an alt attribute; you only decide whether it communicates meaning or signals decoration.

Screenshot of the original WorldWideWeb application on NeXTSTEP showing formatted hypertext documents and menus
The WorldWideWeb Browser-Editor (NeXTSTEP, 1990) The very first web browser, named WorldWideWeb (and later renamed Nexus), running on NeXTSTEP in 1990. Tim Berners-Lee created it simultaneously as a browser and a document editor. Notice the early semantic tags at work: headings, paragraphs, and underlined hypertext links pointing across the CERN network. Credit: CERN / Tim Berners-Lee / Wikimedia Commons · CC BY-SA 3.0 · source
Screenshot of the early NCSA Mosaic browser displaying inline color graphics and formatted text
NCSA Mosaic: The Dawn of the Visual Web (1993) Developed by Marc Andreessen and Eric Bina at the National Center for Supercomputing Applications (NCSA), Mosaic 1.0 was the breakthrough browser that introduced the <img> tag. For the first time, images and formatted text appeared side-by-side inside the page body rather than in separate pop-up windows, turning HTML into a rich publishing format and igniting explosive public adoption of the World Wide Web. Credit: NCSA / University of Illinois / Wikimedia Commons · Public domain · source

Lists and your project list

Use <ul> when order does not matter and <ol> when it does. Here is the project list you will keep building on:

<h2>My projects</h2>
<ul>
  <li>
    <h3><a href="tide-pool.html">Tide Pool</a></h3>
    <p>A water physics toy. Built with canvas.</p>
  </li>
  <li>
    <h3><a href="asteroid-sorter.html">Asteroid Sorter</a></h3>
    <p>A sorting game about rock density.</p>
  </li>
</ul>

Tables are for data, not layout

A table means "this information has rows and columns." If your content is not a grid of related data, do not use one. When it is data, three things make it readable:

<table>
  <caption>Playtest results, spring term</caption>
  <thead>
    <tr><th scope="col">Game</th><th scope="col">Testers</th></tr>
  </thead>
  <tbody>
    <tr><th scope="row">Tide Pool</th><td>12</td></tr>
    <tr><th scope="row">Asteroid Sorter</th><td>9</td></tr>
  </tbody>
</table>

The <caption> says what the table is. <th> marks a cell as a heading rather than data. scope says whether that heading governs its column or its row, so software reading cell by cell can announce "Tide Pool, testers, 12" instead of a bare number.

Accessible forms with modern inputs & validation

Every control needs a <label> whose for matches the control's id. That link is what makes the label clickable, and it is what tells a screen reader which words belong to which box. Placeholder text is not a label: it disappears the moment someone starts typing.

Modern HTML provides specialized input types that automatically trigger appropriate keyboards on mobile devices and provide built-in validation:

<form action="#" method="post">
  <fieldset>
    <legend>Visitor Feedback</legend>

    <p>
      <label for="visitor-name">Your Name (required):</label>
      <input id="visitor-name" name="name" type="text" required autocomplete="name">
    </p>

    <p>
      <label for="visitor-email">Email Address:</label>
      <input id="visitor-email" name="email" type="email" autocomplete="email" placeholder="name@example.com">
    </p>

    <p>
      <label for="favorite-category">Favorite topic:</label>
      <select id="favorite-category" name="category">
        <option value="games">Browser Games</option>
        <option value="sims">Physics Simulations</option>
        <option value="art">Interactive Art</option>
      </select>
    </p>

    <p>
      <label for="rating">Satisfaction rating (1 to 10):</label>
      <input id="rating" name="rating" type="range" min="1" max="10" value="8">
    </p>

    <p>
      <label for="message">Project suggestion:</label>
      <textarea id="message" name="message" rows="4"></textarea>
    </p>

    <p>
      <label>
        <input type="checkbox" name="newsletter" value="yes">
        Notify me when new projects launch
      </label>
    </p>

    <button type="submit">Send Feedback</button>
  </fieldset>
</form>

Notice the required attribute: modern browsers will stop the form from submitting and display a friendly prompt if the field is left empty, without needing any JavaScript!

Be honest about what this form does: nothing yet. A static page made only of HTML and CSS cannot send an email or store database records on its own. Until you connect a form backend (such as Formspree or Netlify Forms, covered in the publishing lesson), add a short note saying "This is a practice form for demonstration."

Herman Hollerith electrical tabulating machine with dials and sorting boxes used in the 1890 US Census
Herman Hollerith's Tabulating Machine (1890 US Census) The genesis of automated relational data. Herman Hollerith invented electrical tabulating machines to record and tally census records encoded in rows and columns on punch cards. HTML <table>, <tr>, <th>, and <td> elements exist strictly to preserve relational meaning in structured datasets like this, never as layout scaffolding. Credit: US Census Bureau / Library of Congress / Wikimedia Commons · Public domain · source
IBM 029 Keypunch machine showing keyboard, card feed hopper, and punching station
IBM 029 Keypunch Data Entry Terminal (1964) The physical ancestor of the web form. Operators keyed information directly into constrained fields on 80-column punch cards, with mechanical program drums validating field lengths and character types before submission. Modern HTML <form>, <input>, and validation attributes (required, type="email", minlength) inherit this essential need for structured, verifiable data collection. Credit: Douglas W. Jones / Wikimedia Commons · CC BY-SA 3.0 · source

Don't forget the <head>: Favicon & Social Previews

While the <body> contains what people see on the canvas, the <head> provides metadata that makes your site look professional in browser tabs and search results:

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <!-- The tab title and search engine description -->
  <title>Jordan's Creative Tech Lab</title>
  <meta name="description" content="Interactive simulations, 3D models, and web games built in STEAM Lab.">

  <!-- The tab icon (Favicon) -->
  <link rel="icon" href="images/favicon.svg" type="image/svg+xml">

  <!-- Social media preview card (Open Graph) -->
  <meta property="og:title" content="Jordan's Creative Tech Lab">
  <meta property="og:description" content="Explore interactive web games and simulations.">
  <meta property="og:image" content="images/preview-banner.png">
</head>

Lab — Fix the outline

The editor below holds a fragment with no headings and no landmark: just paragraphs, and a link that says nothing. Improve it and run it. Aim for a <main> containing one <h1>, an <h2> section, a real list, and link text that would make sense on its own.

Live HTML editor

    The outline a screen reader hears

    What the checker does and does not do. It reads your HTML the way assistive software does: one <main>, one <h1>, headings that never skip a level, a real list, an alt on every image, link words that make sense alone, and no clickable <div>s. The outline underneath is the table of contents a screen reader user navigates by. It is still not an HTML validator — it cannot see an unclosed tag (the browser silently repairs those before the checker looks) and it cannot judge whether your alt text is good, only whether it is there. For the real check, paste your finished page into the W3C Markup Validation Service, which reads the actual specification and tells you the line number of every mistake.

    Check: the preview shows a clear title, a subheading, and a list; every line of the report says pass; and the outline reads like a sensible table of contents.

    Repair: nothing appears in the preview? You probably have an unclosed tag, so everything after it was swallowed. Press Reset the example and reintroduce your changes a few lines at a time. The report says "No <main> landmark yet" even though you typed one? Check the opening tag is spelled <main> and not <mian> — the browser treats a misspelled tag as an unknown element, silently.

    Try breaking it on purpose: once everything passes, change an <h2> into an <h4>, delete an alt, or turn a link into <span onclick="go()">. Predict which line of the report will change before you press Run.

    Put it into your own site

    Now do it for real in index.html: wrap your content in <header>, <nav aria-label="Main">, <main> and <footer>; give the page one <h1>; add your project list with an <h2> above it; add one image with alt text you actually thought about; and add the practice form with its honest note. Save, reload, and run the page through the W3C validator before you stop.

    Your page will look plain, and that is expected — you have written meaning, not appearance. The next lesson gives that structure a design, and it will be far easier because every part of the page is now something CSS can name.

    Level-Up Challenges for Your Website

    Want to push beyond the minimum? Pick a challenge tier to make your personal site stand out:

    Tier 1: Media Showcase

    Add a dedicated <figure data-zoomable> with an authentic image or screenshot of something you made, accompanied by a descriptive <figcaption> explaining what you learned while building it.

    Tier 2: Interactive Feedback Form

    Expand your <form> with at least four distinct input types (e.g. email, range, color, and checkbox). Wrap them inside a semantic <fieldset> with a <legend>.

    Tier 3: Multi-Page Navigation

    Create a pages/ subfolder holding about.html and projects.html. Connect them with an accessible <nav> menu and verify all relative paths back to index.html work seamlessly.

    Before you move on