Inserting a Graphic

One feature of Web pages that has made the World Wide Web so popular is teh ease of displaying a graphic image.  The Web supports two methods for displaying a graphic: as an inline image and as an external image.

An inline image appears directly on the Web page and is loaded when the page is loaded. The Web only supports two graphic types for inline images: GIF (Graphics Interchange Format) and JPEG (Joint Photographic Experts Group).

An external image is not displayed with the Web page. Instead teh browser must have a file viewer, an application that the browser loades auctomatically whenever it encounters the image file and displays the image. You can fine file viewser at servaral Internet Web sites. Most browser make it easy to set up viewers for use with the Web.External images have one disadvantage: you can't actually display them on the Web page. Instead they are represented by an icon that a user clicks to view the image. However, external images are not limited to the GIF and JPEG formats. You can set up virtually any image format as an external image on a Web page, including clips and sound files.

<IMG> is the tag for an inline image. You can place inline image on a separate line in your document, or you can place teh image within a line of txt (hence the term "inline"). To access the iamge file you need to include the filename within the tag. You do this using the SRC property, short for "source." The general syntax for an inline image is:

<IMG SRC="filename">

If the image file is located in the same directory as the HTML file, you do not need to include any directory information. However, if the image file is located in anotehr directory or on another computer, you need to include the full path with the SRC property.
 
 
 


previous page back to main help page next page