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