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