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