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