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