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