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