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