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