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