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