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