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