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