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