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