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