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