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