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