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