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