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