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