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