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