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