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