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