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