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