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