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