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