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