Web Hosts
with
Website Builders
Hosting trusted by almost 4 million sites!

Click to TRY FREE

Get a Website in Minutes at Web.com

HTML Code Tutorial

Tutor Ebook Download

Images in HTML Pages

The anchor tag is used to add images to a page:
<img src="image-name"> (See Anchor Tag - Image)

The most commonly used image formats used in HTML pages are GIF, JPG and PNG.

GIF Files

The GIF (Graphics Interchange Format) format is the most commonly used image file type used on the web. All web browsers can display GIF files. There are variations of the GIF format. GIF87 includes a feature called interlacing. GIF89 format includes interlacing and another feature called transparency.

Interlacing means that the image is displayed gradually and has the appearance of a blurry picture coming into focus.

Transparency means that the background color of the image is transparent and allows the background color of the web page to show through.

8 bit coded GIF images can include up to 256 colors.

JPG Files

JPEG (Joint Photographic Experts Group) or JPG file format is used mostly for photographic image display. Colors are encoded with 24 bits per pixel, allowing more than 16 million colors to be rendered.

Interlacing and transparency are not available with JPG format.

When displaying larger images JPG format will often produce smaller file sizes than the GIF format. Smaller images are better suited to GIF format for producing smaller file sizes.

PNG Files

PNG (Portable Network Graphics) format is the late comer of image formats, but is now supported by the majority of browser types. PNG offers both interlacing and transparency, and also offers more colors than the GIF format. (48 bits per pixel) PNG usually produces smaller file sizes than GIF or JPG.

PNG also offers several error checking facilities.

Optimizing Images

Optimizing is the process of reducing an image to the least number of bits per pixel and colors without sacrificing the quality of the displayed image. Large images and slow modems are a major cause of irritation for web surfers. Many good graphic creation programs include features for optimization.

Always check your images when HTML pages are uploaded to your web space. Many images will display quite differently over your web hosts server, than they do when viewed on your PC.

Monitor Resolution and Images

Consider the resolution setting of your visitor's monitor when placing images. Not all surfers have their monitor resolution set to a 1000+ width. Many still use an 800X600 resolution setting. That means if you place images on your pages in excess of 800px in width, that viewers with 800X600 res. settings will need to scroll to the right on your pages.

Note: For adding images to your web pages see Paragraphs and Images.

Check out our Free Frames Template Kit or try our Free Frames Kit Demo



CGI Online
How to Create a Website -Tutorial
Main Website


This Free HTML Tutorial
is provided by Net Success 2000 Plus Inc.
PO Box 1508
Somerset, KY 42502
Last Modified: September 26, 2007

HTML Codes Tutor Ebook