Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 424701 of <spacer>

  • Revision slug: Web/HTML/Element/spacer
  • Revision title: <spacer>
  • Revision id: 424701
  • Created:
  • Creator: tregagnon
  • Is current revision? No
  • Comment

Revision Content

{{ obsolete_header() }}
 

Summary

<spacer> is an HTML element which is used for inserting white spaces to web pages. It was created by NetScape for achieving same effect as a single-pixel layout GIF image, which was something web designers used to use to add white spaces to web pages, without actually using a GIF. However <spacer> is not supported by any major browser and same effects can be created with various CSS rules. In Mozilla applications, support for this element was removed in {{gecko("2.0")}}. Therefore usage of <spacer> is unnecessary.

Attributes

Like all other HTML elements, this element supports the global attributes.

{{ htmlattrdef("type") }}
This attribute determines type of spacer. Possible values are horizontal, vertical and block.
{{ htmlattrdef("size") }}
This attribute can be used for defining size of spacer in pixels when type is horizontal or vertical.
{{ htmlattrdef("width") }}
This attribute can be used for defining width of spacer in pixels when type is block.
{{ htmlattrdef("height") }}
This attribute can be used for defining height of spacer in pixels when type is block.
{{ htmlattrdef("align") }}
This attribute determines alignment of spacer. Possible values are left, right and center.
 

Example

<span>Just a text node</span>
<spacer type="horizontal" size="10"></spacer>
<span>Just another text node</span>
<spacer type="block" width="10" height="10"></spacer>

{{ HTML:Element_Navigation() }}

Revision Source

<div>
  {{ obsolete_header() }}</div>
<div>
  &nbsp;</div>
<h2 id="Summary" name="Summary">Summary</h2>
<p><code>&lt;spacer&gt;</code> is an HTML element which is used for inserting white spaces to web pages. It was created by NetScape for achieving same effect as a single-pixel layout GIF image, which was something web designers used to use to add white spaces to web pages, without actually using a GIF. However <code>&lt;spacer&gt; </code>is not supported by any major browser and same effects can be created with various CSS rules. In Mozilla applications, support for this element was removed in {{gecko("2.0")}}. Therefore usage of <code>&lt;spacer&gt;</code> is unnecessary.</p>
<h2 id="Attributes" name="Attributes">Attributes</h2>
<p>Like all other HTML elements, this element supports the <a href="/en-US/docs/HTML/Global_attributes" title="HTML/Global attributes">global attributes</a>.</p>
<dl>
  <dt>
    {{ htmlattrdef("type") }}</dt>
  <dd>
    This attribute determines type of spacer. Possible values are <code>horizontal</code>, <code>vertical</code> and <code>block</code>.</dd>
  <dt>
    {{ htmlattrdef("size") }}</dt>
  <dd>
    This attribute can be used for defining size of spacer in pixels when type is <code>horizontal</code> or <code>vertical</code>.</dd>
  <dt>
    {{ htmlattrdef("width") }}</dt>
  <dd>
    This attribute can be used for defining width of spacer in pixels when type is <code>block</code>.</dd>
  <dt>
    {{ htmlattrdef("height") }}</dt>
  <dd>
    This attribute can be used for defining height of spacer in pixels when type is <code>block</code>.</dd>
  <dt>
    {{ htmlattrdef("align") }}</dt>
  <dd>
    This attribute determines alignment of spacer. Possible values are <code>left</code>, <code>right</code> and <code>center</code>.</dd>
  <dt>
    &nbsp;</dt>
</dl>
<h2 id="Example">Example</h2>
<pre class="brush:html">
&lt;span&gt;Just a text node&lt;/span&gt;
&lt;spacer type="horizontal" size="10"&gt;&lt;/spacer&gt;
&lt;span&gt;Just another text node&lt;/span&gt;
&lt;spacer type="block" width="10" height="10"&gt;&lt;/spacer&gt;
</pre>
<p>{{ HTML:Element_Navigation() }}</p>
Revert to this revision