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