It was recognised early on that although the size of
table cells could not be set directly, each cell could contain an image through an IMG tag. The size of image tags
could be set independently, with their WIDTH and HEIGHT attributes. The table cell would then resize itself automatically to just contain this image. It was also realized that the displayed size was controlled entirely by the attributes and was independent of the actual size of the image file used (although a real image file was still needed). Accordingly, the same image file could be used for all the many spacer images needed on a web page. The only requirement was that this image was invisible, either by being the same color as the page, or by being transparent. Spacer GIFs themselves were small transparent image files.
GIF files were used as it was a common format that supported
transparency, unlike
JPEG. These files were commonly named spacer.gif, transparent.gif or 1x1.gif. Prior to the widespread adoption of
Cascading Style Sheets (CSS), the spacer GIFs were used to control blank space within a
web page, that can be resized according to the
HTML attributes it is given. The reason a spacer GIF is invisible is so that an
HTML developer can create a table cell and fill the background with a specific color that can be viewed through the transparent spacer GIF. For instance, a developer seeking to create a square blue box 500
pixels on a side could use a separate blue 500×500 graphic at the expense of additional bandwidth. Instead, the developer can specify the table cell background color and specify the dimensions of a pre-existing transparent spacer GIF. == Drawbacks ==