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