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