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