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