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