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