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