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