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