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