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