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