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