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