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