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