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