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