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