The <SPACER> tag provides better control over the spacing of objects and white-space in HTML pages. The advantage for DTV developers is that it takes much less memory/processing than images.
The attributes to the <SPACER> element are; TYPE, SIZE, WIDTH, HEIGHT & ALIGN.
The BLOCK spacer is the default for the <SPACER> tag and behaves almost exactly like an invisible image. This provides developers with an alternative to using small transparent image files displayed at different sizes (e.g. spacer.gif).
When using the BLOCK type of spacer the SIZE attribute is ignored, and instead the WIDTH, HEIGHT, and ALIGN attributes are applied just as they would be for the IMG tag.
| ATTRIBUTE |
CORRECT SYNTAX |
APPLICATION WITH ‘BLOCK’ SPACER TAG |
| WIDTH |
WIDTH="width" |
This attribute controls the absolute width in pixels of the "spacer" rectangle |
| HEIGHT |
HEIGHT="height" |
This attribute controls the absolute height in pixels of the "spacer" rectangle |
| ALIGN |
ALIGN="LEFT"|"RIGHT"|"TOP"|"ABSMIDDLE"|"ABSBOTTOM"| |
This attribute controls the alignment of the "spacer" rectangle in exactly the same way it would control the alignment of an IMG tag (default = bottom) |
e.g. spacer type="block" height="2" width="50" align="left"
Hints & Tips
- See Netscape’s Developer site for a full reference.
- The Spacer is a Netscape HTML tag and will therefore ONLY show up in Netscape Navigator. (THEY WILL NOT SHOW IN MS INTERNET EXPLORER!)
- It may not be suitable to use spacer tags when using dynamic tables to change content