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