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