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