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