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