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