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