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