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