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