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