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