Learn HTML ๐Ÿฐ

Five tiny lessons. Each one has a grown-up explanation, a kid-simple version, and a game to earn stars.

1 ยท Tags are like lunchboxes ๐Ÿท๏ธ

HTML is made of tags. A tag tells the browser what something is: a heading, a paragraph, a picture. Most tags come in pairs: an opening tag and a closing tag with a slash /. Whatever goes between them is the content.

<h1>Hi Nia!</h1>
<p>You are a <strong>superstar</strong>.</p>

๐Ÿ‘ง Kid version: A tag is a lunchbox. You open it, put your sandwich inside, and close it. If you forget to close it, your lunch falls out!

๐ŸŽฎ Game: Which tag closes this lunchbox? <h1>Hi Nia! ____

2 ยท Head vs. Body ๐Ÿง ๐Ÿ’ƒ

Every page has two parts. The <head> holds information about the page: its title in the browser tab, its character set, and links to files like the stylesheet. You don't see it on the page itself. The <body> holds everything you actually see: headings, paragraphs, pictures, links, menus.

<html>
  <head>   โ† thinking stuff (title, styles.css)
  </head>
  <body>   โ† showing stuff (words, pictures)
  </body>
</html>

๐Ÿ‘ง Kid version: Your head is where you think: your name, what outfit to wear. Your body is what people see when you dance!

๐ŸŽฎ Game: Tap a tag, then tap the box it belongs in. (+2 โญ)

<title> <h1> <link rel="stylesheet"> <img> <meta charset="utf-8"> <p> <nav>

๐Ÿง  <head>

๐Ÿ’ƒ <body>

3 ยท Pictures need words ๐Ÿ–ผ๏ธ

The <img> tag brings a picture into the page. It has no closing tag. It needs two attributes: src (where the picture file is) and alt (words that describe it). Alt text is read aloud by screen readers and shows up if the picture can't load.

<img src="img/unicorn.png" alt="A pink unicorn with a rainbow mane">

๐Ÿ‘ง Kid version: src tells the computer where the picture lives. alt tells a friend who can't see it what the picture is.

๐ŸŽฎ Game: Which one correctly shows a unicorn picture?

5 ยท One closet of outfits ๐ŸŽจ๐Ÿ‘—

Instead of styling every page separately, put all your styles in one file, styles.css, and link it in the <head> of every page. Change a color in that one file and every page that links to it changes. That's how a site keeps one brand.

<link rel="stylesheet" href="styles.css">

/* inside styles.css */
.bar { background: #ff6fb5; }

๐Ÿ‘ง Kid version: All your dolls share one closet. Pick a new color dress in the closet, and every doll wears it!

๐ŸŽฎ Game: Pick a color for the "closet" and watch all three pages change.

index.html

Home page

learn.html

Lessons page

rewards.html

Rewards page