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