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