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