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