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