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