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