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