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