Interactive online courses HTML Academy
2026-03-09 10:47 Diff

In the next few assignments, we’ll take a look at the most common image formats for the web. And we will figure out where and how they can best be used for creating a layout.

The first format is JPEG. This format is well suited for photos and images, and it is poorly suited for diagrams, drawings, text, and graphics.

When saving an image in JPEG format, you can set the quality level. This allows you to reduce the file size while still retaining fairly good image quality.

However, if you set the quality level too low, artifacts will appear.

JPEG does not support transparency, so a JPEG image is always a rectangle. You can simulate transparency by setting the background color of the image in the graphics editor to match the contents of the photo container.

Use JPEG for posting photos, since it provides the best file size/quality ratio.