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