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