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