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