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