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