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