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