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