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