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