Departmental website · Edition 2

Understand files

Explain what belongs in HTML, CSS and JavaScript.

Before you begin

Basic HTML headings and labels, and experience opening the browser preview.

The practical problem

A fictional training department needs a welcoming landing page. It should still explain its services when scripts are unavailable.

Build it step by step

  1. Put the sections, headings and visible text in index.html.
  2. Put colour, layout and spacing in style.css. Add a small button-driven detail or counter in script.js.
  3. Compare the static and interactive previews. Add a short notes file that tells a new teammate where each kind of change belongs.

Acceptance criteria

  • The page remains meaningful in the static preview.
  • A styling change needs only a CSS edit.
  • One clearly labelled interaction is available in the interactive preview.

Common mistake

Do not rely on JavaScript to write the page’s only heading. Separate initial information from optional interaction.

How to assess your work

Run the checks below and write down what you expected, what happened, and one change you can demonstrate. Self-checks are practice evidence, not a verified grade.

Build

Create three source files. Put structure in HTML, styles in CSS, and one interaction in JavaScript.

Test

Change only the CSS and confirm the layout changes. Disable JavaScript and verify the main content is still readable.

Reflect

Which file would another learner edit to change the layout? What still works without JavaScript?

Starter project and AI hint

Create sections for the department, its services, and a contact example.

Ask the tutor to explain which file owns each responsibility, without rewriting your page.