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