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