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