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