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