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