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