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