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