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