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