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