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