Line break element for breaking text to a new line. While valid, consider CSS for most spacing needs. Learn more →
<spacer> ElementThe <spacer> element was a Netscape-only proprietary tag introduced in Netscape Navigator 3.0 for adding blank space to web pages. It allowed developers to insert horizontal space, vertical space, or block-level spacing without using images or CSS (which was less mature at the time).
This element never gained widespread adoption, was never standardized, and has been completely removed from all modern browsers.
<!-- Never use this! For reference only --><spacer type="horizontal" size="20"><spacer type="vertical" size="50"><spacer type="block" width="100" height="50" align="left">These attributes only worked in old versions of Netscape Navigator:
| Attribute | Description | Values |
|---|---|---|
type | Type of spacing | horizontal, vertical, block |
size | Size of space (for horizontal/vertical) | Number (pixels) |
width | Width of space (for block type) | Number (pixels) |
height | Height of space (for block type) | Number (pixels) |
align | Alignment (for block type) | left, right, center |
Adds horizontal space inline with text, similar to adding extra spaces between words.
Text<spacer type="horizontal" size="50">More textAdds vertical space, pushing content down.
First line<spacer type="vertical" size="30">Second line (pushed down)Creates a rectangular block of empty space with specific dimensions.
<spacer type="block" width="100" height="50" align="left"><!-- This code does nothing in modern browsers --><p>Start of text<spacer type="horizontal" size="50">spaced text</p>
<spacer type="vertical" size="30">
<p>This paragraph would have been pushed down</p>
<spacer type="block" width="200" height="100" align="left"><p>This would flow around the block space</p>The <spacer> element was deprecated and removed for several important reasons:
All spacing that <spacer> attempted to achieve can be done better with CSS.
The most common and recommended approach for adding space:
The modern, preferred way to add space between flex items:
Perfect for creating consistent spacing in grid layouts:
For adding space between inline elements:
If you encounter legacy code using <spacer>, here’s how to migrate:
Old (Netscape only):
Text<spacer type="horizontal" size="50">More textNew (CSS):
<style> .spaced { margin-right: 50px; display: inline-block; }</style><span class="spaced">Text</span>More textOld (Netscape only):
<p>Paragraph 1</p><spacer type="vertical" size="30"><p>Paragraph 2</p>New (CSS):
<style> .with-space-below { margin-bottom: 30px; }</style><p class="with-space-below">Paragraph 1</p><p>Paragraph 2</p>Old (Netscape only):
<spacer type="block" width="100" height="50" align="left"><p>Content flows around</p>New (CSS with Flexbox/Grid):
<style> .container { display: flex; gap: 20px; /* Space between items */ }
.spacer { width: 100px; height: 50px; }</style><div class="container"> <div class="spacer"></div> <p>Content with proper spacing</p></div>gap is the cleanest solution<div> elements just for spacingmargin-block-end instead of margin-bottom for better internationalization| Browser | Version | Support |
|---|---|---|
| Netscape Navigator | 3.0 - 4.x | Supported |
| Internet Explorer | All | Never supported |
| Chrome | All | Never supported |
| Firefox | All | Never supported |
| Safari | All | Never supported |
| Edge | All | Never supported |
The <spacer> element only ever worked in Netscape Navigator 3.0 through 4.x (released 1996-1997). When Netscape 6 switched to the Gecko engine in 2000, support was dropped.
Line break element for breaking text to a new line. While valid, consider CSS for most spacing needs. Learn more →
Generic container for flow content. Use with CSS for layout and spacing.
Learn more → Generic inline container. Use with CSS margin for inline spacing.
Learn more → CSS Box Model Learn about margin, padding, and modern spacing techniques. The References:Specifications
Section titled “Specifications”<spacer> element was never part of any W3C or WHATWG specification. It was a proprietary Netscape extension that was never standardized.