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