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