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