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