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