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