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