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