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