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