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