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