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