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