Home : Basic HTML/CSS tutorial : Images etc. : Summary
Introduction
Preparing images
Images in HTML
Page size
Summary
< Previous: Page size

Summary

Images must be in an appropriate format

JPEG files are appropriate for photographs. GIF files, or sometimes PNG files, are appropriate for some drawings with large areas of flat (not shaded) colour.

Images are placed with the IMG tag

The picture must be stored in a file on the web server and can then be referenced from within the HTML document using an <img> tag. The image will appear at that point in the document.

The ALT attribute provides access

In order to be accessible to those using speech browsers, text-only browsers, or who have turned images off, each image should have an alt attribute providing a basic text equivalent or summary of the image.

Total filesize should be small

The total size of a page (including the HTML file and all image files) should be under 30 KB for the majority of pages. You can usually achieve this by using few images, re-using images where possible, and making sure images are compressed effectively.