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