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