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