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