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