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