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