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