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