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