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