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