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