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