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