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