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