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