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