DOMAIN
0/120
Raising the world from the page…
HTML · Lesson 1/20
Your First Element
The path stops after one stone. Write more stones in the HTML until the path reaches the gold ledge.
Chapter 1 · HTML◆Lesson 1 of 20

Your First Element

<div>
You will learn

Write an HTML element with an opening tag and a closing tag.

Your task

The path stops after one stone. Write more stones in the HTML until the path reaches the gold ledge.

1Read the idea

A web page is built out of elements. Every element is a box on the page — and in this world, every box is a block you can stand on.

You write an element with tags. An opening tag like <div> starts it, and a closing tag like </div> ends it. The closing tag has a / in it.

class="stone" inside the opening tag gives the element a name. The CSS for this level already says what a stone looks like, so every element named stone becomes a stone block.

Dom can jump about 200px across. Right now the gap after the last stone is 480px.

2Study the example

Example · HTML
1<div class="stone"></div>← one complete element
2<div← the opening tag starts…
3 class="stone"← …an attribute gives it a name…
4>← …and the opening tag ends
5</div>← the closing tag — note the /

3Do it, step by step

Quick reference · Elements

<tag>content</tag>
<div></div>a box with nothing inside
<div class="stone"></div>a box named stone
<!-- a comment -->a note for people; the browser ignores it

Stuck? Ask the Old Ant

“Each time you ask, I'll say a little more. The last thing I give you is the line itself — try to finish before then.”

    Controls
    • AD moveSpace jumpEsc leave the editor
    • F see the flat web pageV cameraR respawn
    • Right-drag to look around, scroll to zoom. Click a block to inspect its element.