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