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