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