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