×

html · level 1 · unit 3 · lesson 2

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

<img> puts a picture on the page.

An is a picture on your page, like a photo or a drawing. Add one with the <img> tag. It is an empty element, like <br>, so it has no closing tag.

The src attribute, short for source, names the picture to show. Each picture is saved as a with its own name, such as cat.svg. Spell it exactly, ending and all.

Pictures sit in a line like words do. Put two side by side and, if there is room, they stay on the same line.

<h2>Meet Whiskers</h2>
<img src="cat.svg">

Press show my page to see it here.

Every picture also needs words for people who cannot see it. That is the next lesson.