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