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