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