Exercises — Stage 0: Create the Game Screen
Exercise 1: Change the heading
Goal: See how editing the HTML file instantly changes what the browser shows.
Steps:
- Open
index.htmlin your editor. - Change
<h1>Box Runner</h1>to<h1>Cube Dash</h1>. - Save the file.
- Go back to your browser tab and reload the page.
What happened: The heading updated. The browser reads the file from disk each time you reload, so any change you save shows up immediately. Change it back to Box Runner before moving on.
Exercise 2: Break the page on purpose
Goal: Learn what happens when HTML is malformed.
Steps:
- Remove the closing
</h1>tag. - Save and reload the page.
- Observe that the tagline and the button look weird — they may render as part of the heading.
- Put
</h1>back and reload.
What happened: Browsers try very hard to render broken HTML, but they guess. Closing tags matter. This is why a "save point" system (Git, coming in Stage 1) is helpful — you can always get back to a working version.
Exercise 3: Peek at the browser tab
Goal: Understand what <title> does.
Steps:
- Change
<title>Box Runner</title>to<title>My First Page</title>. - Save and reload.
- Look at the browser tab — not the page, the tab itself at the top.
What happened: The tab label changed, but the page content did not. <title> only controls the tab. Change it back to Box Runner.
Exercise 4: Click the button
Goal: Confirm the button is just a button for now.
Steps:
- Click the Start Game button a few times.
- Notice that nothing happens beyond a tiny visual press effect.
What happened: A <button> element is clickable, but without JavaScript it has no behavior attached. This tutorial never adds JavaScript — the button is a visual prop so Git commits have something to show.