Web Technology Basics
Which of the following is an appropriate pairing of an image format for web pages with its typical use?
- AA logo with a transparent background: JPEG. It can store transparent areas as they are
- BA landscape photo: PNG. Because it is lossless, it is always smaller than JPEG for photos
- CA company logo or icons: SVG. Because it describes shapes with coordinates and formulas, it does not blur when enlarged
Show answer and explanation
Answer: C. A company logo or icons: SVG. Because it describes shapes with coordinates and formulas, it does not blur when enlarged
JPEG uses lossy compression and can make photos small, but it cannot handle transparent areas. PNG uses lossless compression and can handle transparency, and suits images with crisp text and lines, but for photos it is generally much larger than JPEG. SVG is a vector format that describes shapes as XML text, so it displays smoothly at any size and suits logos and icons. WebP and AVIF support both lossy and lossless compression and transparency, and can generally be smaller than JPEG or PNG at the same quality.
- A. JPEG cannot handle transparent areas. When transparency is needed, PNG, WebP, SVG or the like is used.
- B. PNG is lossless, so for photos it is generally larger than JPEG.
- C. Correct. SVG is a vector format, so it does not blur however much it is enlarged.