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