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