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