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