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