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