Image Etiquette


Images are fun and colorful and easy to add to your HTML, but following are some etiquette rules to follow if you want your visitors to be happy with your site.

  • The larger an image's file size, the longer it will take to load into the browser. Because most visitors to the World Wide Web still use a slow speed modem to connect from home, their time is precious. If you remember that and make sure to use small images whenever possible, you'll find that your visitors are happier.

  • Not only is the file size of the individual image important, but also is the total file size of your HTML document. The more images you addeven small imagesthe larger your file size will become. Previewing your page in several browsers will help you determine how long your page will take to load in the browser. If you find the time too slow, so will your visitors.

  • While the alt attribute is one of the most important attributes (because it should be used every time you use the <img /> tag), it pays to remember a simple guideline: Make sure that the text for the alt attribute is relevant to the imageanything less will frustrate your visitors.

  • On the subject of relevance: Be sure that your images are relevant to the text. An image of an airplane works great if you're talking about travel plans, but means nothing if you're talking about wildlife.

  • You can find images all over the Internet, and saving them to your own computer for use later is easy (see the following Tip). Just as in the publishing world, however, graphic designers can protect their images by copyright. If you've found an image you like on a commercial Web site, look for a copyright notice or other legal statement that indicates whether the image is free for the taking. There are plenty of free images available on the Internet without using copyrighted material.

Tip

You can copy any Web image to your own computer, as long as it isn't protected by copyright. Just right-click on the image (or hold down the mouse button if you are on a Macintosh computer) and select Save Image As from the pop-up menu. Save the file on your own computer and use it as you would any other image file.


Table 8.2 lists the HTML tags that were discussed in this lesson.

Table 8.2. HTML Tags Used in This Lesson

HTML Tag

Closing

Description of Use

<img src="/books/1/174/1/html/2/location" />

 

Adds an image to an HTML document.

<object>

</object>

Adds an object (can be used for images) to a HTML document.


In this lesson, you've learned:

  • The two most frequently used graphics file formats found on the Web are GIF and JPEG. JPEG is used primarily for realistic, photographic-quality images; GIF is used for almost everything else. PNG is expected replace GIF sometime in the future.

  • All images are added to HTML documents with the image tag and the source attribute, <img src="location" />.

  • You can use the <a> tag to link an image to another document.

  • Images are part of the fun of Web pages, but they are also part of the problem; larger file sizes mean longer page load times.



Sams Teach Yourself HTML in 10 Minutes
Sams Teach Yourself HTML in 10 Minutes (4th Edition)
ISBN: 067232878X
EAN: 2147483647
Year: 2004
Pages: 151
Authors: Deidre Hayes

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net