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