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