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