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