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