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