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