Command Palette

Search for a command to run...

Hectal
Back to the lesson: Topic 0.2 — HTML, CSS and JavaScript: Three Jobs
HTML · Example 1 of 2

One page, three languages

Every web page is built from three languages with separate jobs: HTML says what is on the page, CSS says how it looks, and JavaScript makes it react.

Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.

Ready for more? This phase has 3 hands-on exercises with automatic checks.

Practice questions

Write the code in the editor, run it, then open the model answer to compare.

01

In the first example, add a second button with id reset and text Reset. Don't make it work yet: just add it in HTML and check it appears with the same style as the first button.

02

Make the reset button work: when clicked, set the count back to 0.

Explain it without notes

01

Describe the job of HTML, CSS and JavaScript in one sentence each.

02

Why is it a good idea to keep content, looks and behaviour in separate languages?

One page, three languages

Preview

Press Run to see the page.

Console

Nothing logged yet.