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