<spacer> HTML Tag

Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
What does <spacer> HTML Tag do?
The <spacer> element was used to add whitespace to web pages by replicating the effect of adding a small image to web page of the same color as the background color of the web page. This element is obsolete. Use modern CSS equivalents to add space between elements of a web page.

Do not use. The <spacer> element is obsolete in HTML 5.

Note: The following is for historical information and research purposes, as <spacer> element is obsolete in HTML 5.

Occasionally you will find that you want to put some empty space into your document to spread things out. Frequently this has been done with by using “invisible” images which are either entirely transparent, or are the same color as the background. Unfortunately, both of these methods are unreliable. is Netscape’s answer to this need for including blank space in your document. is like an image, except that there is not actually a picture in the space where the image would be.

You must specify the spacer as one of three types: vertical; horizontal; and block, which is both vertical and horizontal. Use the TYPE attribute to do this.

Claire is seasoned technical writer, editor, and HTML enthusiast. She writes for HTML.com and runs a content agency, Red Robot Media.