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