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