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