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