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