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