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