HTML Worksheet: Images and Alt Text
Code tip (File and words): <img src="file.jpg" alt="what it shows" width="200"> — no closing tag. src = which file to load; alt = words describing it; width / height = size in pixels. If the picture fails, the browser shows the alt text; screen readers read it aloud.
NameDateTime takenScore ___ / 40
-
1.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="250"> (a) moon.png (b) The full moon (c) fort.jpg (d) bus.jpg -
2.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="350"> -
3.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="300"> (a) map.png (b) Birthday cake (c) Map of India (d) width - 4.True or false: in <img>, alt describes the picture. (a) False (b) True
- 5.True or false: in <img>, src sets how wide it is. (a) False (b) True
- 6.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
7.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> (a) tiger.jpg (b) A tiger asleep (c) width (d) A red kite - 8.🖼️ Which attribute of <img> describes the picture? (a) src (b) width (c) alt (d) height
-
9.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="350"> - 10.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) alt (c) width (d) height
-
11.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="200"> (a) dog.jpg (b) Map of India (c) cake.jpg (d) map.png -
12.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> (a) A red kite (b) A tiger asleep (c) tiger.jpg (d) width -
13.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) tiger.jpg (b) A red kite (c) width (d) A tiger asleep -
14.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="250"> - 15.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <a> (d) <img>
-
16.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="250"> - 17.True or false: in <img>, height is read by screen readers. (a) False (b) True
- 18.True or false: in <img>, src names the picture file. (a) True (b) False
-
19.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) dog.jpg (b) moon.png (c) bus.jpg (d) A happy dog - 20.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) src (c) width (d) height
-
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) width (b) The full moon (c) A happy dog (d) dog.jpg - 22.True or false: in <img>, height sets how tall it is. (a) True (b) False
- 23.True or false: in <img>, alt is read by screen readers. (a) True (b) False
- 24.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) height (d) width
-
25.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="150"> (a) A red kite (b) map.png (c) cake.jpg (d) kite.png -
26.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="200"> -
27.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="200"> (a) bus.jpg (b) moon.png (c) A happy dog (d) dog.jpg -
28.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="200"> - 29.True or false: in <img>, width shows if the image fails. (a) True (b) False
-
30.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="100"> (a) moon.png (b) dog.jpg (c) Birthday cake (d) cake.jpg - 31.True or false: in <img>, alt sets how tall it is. (a) True (b) False
-
32.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) kite.png (b) tiger.jpg (c) map.png (d) A tiger asleep -
33.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="300"> - 34.True or false: in <img>, src tells which image to load. (a) True (b) False
-
35.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="400"> - 36.True or false: in <img>, height sets how wide it is. (a) False (b) True
-
37.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="350"> (a) cake.jpg (b) width (c) Birthday cake (d) A happy dog -
38.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="250"> (a) cake.jpg (b) width (c) A happy dog (d) Birthday cake -
39.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="300"> (a) tiger.jpg (b) bus.jpg (c) fort.jpg (d) Our school bus - 40.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
Answer key
- moon.png
- 350
- Map of India
- True
- False
- No
- A tiger asleep
- alt
- 350
- alt
- map.png
- A tiger asleep
- A tiger asleep
- 250
- <img>
- 250
- False
- True
- dog.jpg
- height
- A happy dog
- True
- True
- width
- kite.png
- 200
- dog.jpg
- 200
- False
- cake.jpg
- False
- tiger.jpg
- 300
- True
- 400
- False
- Birthday cake
- Birthday cake
- bus.jpg
- to describe the image
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids