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