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