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