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