Free lesson

Build the semantic HTML file

Build the semantic HTML file — Build an accessible landing page with AI. Use structure the browser understands; Save index.html; Check links and language. Practical assignment: Lab evidence.

Demo edition. The materials are undergoing editorial review.

Topics covered

  • Use structure the browser understands
  • Save index.html
  • Check links and language

Use structure the browser understands

Use header, nav, main and sections for actual meaning. A link moves to a destination; a button performs an action. Preserve heading order.

The training offer is a fictional clay workshop with six places and a Tuesday session. Those facts are examples, not a real business advertisement. Write the content before decorating it: who the page serves, what happens and what the visitor can actually do. AI can suggest markup, but you remain responsible for truthful claims, understandable navigation, accessible controls and a functioning destination for each promised action.

Save index.html

Create this complete starting document. Keep its IDs stable because links, labels and later scripts depend on them. The example interface text is English for the shared code fixture.

The stylesheet and script references are relative filenames, so moving one file into another folder breaks loading. During this stage app.js can be empty; a missing stylesheet explains an unstyled page, while a missing script becomes relevant only once the form handler is added.

Save each example in the named file, keeping the three files in one directory. Refresh the browser after changes and inspect the actual document, not only an assistant preview. Keep external libraries out of this small exercise so every behavior remains visible. Ask for one change at a time, supply the current snippet and specify the expected result and the cases that must remain working.

<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Clay workshop — training demo</title><link rel="stylesheet" href="styles.css"><script src="app.js" defer></script></head><body>
<a class="skip" href="#main">Skip to content</a>
<header><nav aria-label="Main"><a href="#details">Workshop details</a><a href="#contact">Demo form</a></nav></header>
<main id="main"><h1>Try a clay workshop</h1><p>Fictional training page. Tuesday session, six places.</p><a class="cta" href="#details">View details</a>
<section id="details"><h2>What happens</h2><p>Bring a washable apron. Price and address are not specified in this demo.</p></section>
<section id="contact"><h2>Try the form</h2><p>No real booking or message is sent.</p></section></main><footer><p>Training project</p></footer></body></html>

Check links and language

Open index.html and follow both navigation links with Tab and Enter. Each target must exist. If translating visible copy, update the document lang value accordingly.

Check the page with keyboard navigation, a narrow viewport and JavaScript disabled where appropriate. A visible button is not evidence that a request was delivered. This course keeps the form explicitly demonstrative and sends no personal information. Before a real launch, choose and verify the receiving service, retention policy and server validation. Publishing is a separate action; a local preview does not make the page public.

Practical assignment

Lab evidence

Continue to learning

Course outline

  1. Turn the offer into a useful brief
  2. Build the semantic HTML file
  3. Make the layout responsive
  4. Add an honest accessible demo form
  5. Add JavaScript without false success
  6. Review files and prepare static deployment