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 311799 of <spacer>

  • Revision slug: HTML/Element/spacer
  • Revision title: spacer
  • Revision id: 311799
  • Created:
  • Creator: avsaro
  • 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 is created by NetScape for achieving same effect with single-pixel layout GIF, which was something web designers used to use putting white spaces to web pages, without actually using GIF. However <spacer> is not supported by any major browser and same effects can be created with various CSS rules. 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>

Revision Source

<div>
  {{ obsolete_header() }}</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 is created by NetScape for achieving same effect with single-pixel layout GIF, which was something web designers used to use putting white spaces to web pages, without actually using GIF. However <code>&lt;spacer&gt; </code>is not supported by any major browser and same effects can be created with various CSS rules. 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 horizontal, vertical and block.</dd>
  <dt>
    {{ htmlattrdef("size") }}</dt>
  <dd>
    This attribute can be used for defining size of spacer in pixels when type is horizontal or vertical.</dd>
  <dt>
    {{ htmlattrdef("width") }}</dt>
  <dd>
    This attribute can be used for defining width of spacer in pixels when type is block.</dd>
  <dt>
    {{ htmlattrdef("height") }}</dt>
  <dd>
    This attribute can be used for defining height of spacer in pixels when type is block.</dd>
  <dt>
    {{ htmlattrdef("align") }}</dt>
  <dd>
    This attribute determines alignment of spacer. Possible values are left, right and center.</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>
Revert to this revision