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