
GIF files can only support a maximum of 256 colours and work best on flat colour artwork such as drawings, cartoons and logos. During the eighties the Graphics Interchange Format (GIF) for images was made popular by Compuserve. Before this period most of the information transmitted between computers was text. Compuserve needed a fast and efficient format to transmit images between computers. The GIF format uses a file compression method known as LZW (after Lempel Zev Welch). This compresses data without loss of information. The information is compressed by sending codes which represent repeating series of characters. The method requires that a history of all characters sent is retained. A single character code (1 byte) could represent thousands of actual characters. The telecommunications network would only need to transmit the single character. The browser would recreate the thousands of actual characters from this single character and knowing the ones transmitted previously.
One big argument for using a GIF image is that the format supports transparency so that the boundarys of the image appear to be random. The following two images are basically the same, however the second image has been told to consider the light grey colour as transparent.

A GIF image without and with transparency
GIF images can also be animated.