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