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