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