Fandom

HTML & CSS Wiki

Spacer

649pages on
this wiki
Add New Page
Comments0 Share

This deprecated, browser-specific element is not recommended. Authors should generally find an alternative way to accomplish the same task while adhering to all best practices, or simply do without it if it is unimportant.


The void HTML <spacer /> element inserts a space in the document. The space can be between characters or between lines, or it can be a spacing rectangle, similar to an invisible image. The author can control horizontal-only spacing, vertical-only spacing, or block spacing (vertical and horizontal) as well. This element is only supported by Netscape, but since CSS can do the same task at a better level, later on even Netscape stopped supporting it. Its use is strongly discouraged.

AttributesEdit

  • type - Specifies whether the extra space is inserted between characters or between lines, or whether it is a rectangular space that is effectively an invisible image. Values are horizontal, vertical, or block.
  • align - This attribute only applies when type is block. It controls the alignment of the surrounding text relative to the spacing block. Values are left, right, top, texttop, middle, absmiddle, baseline, bottom, or absbottom.
  • height - This attribute only applies when type is block. It controls the pixel height of the rectangular space.
  • width - This attribute only applies when type is block. It controls the pixel width of the rectangular space.
  • size - This attribute only applies when type is horizontal or vertical. It controls the pixel width or height of the element.


Example:

<spacer type="block" align="left" width="100" height="100" />
This is text that began with a <spacer /> element.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.