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