HTML <spacer> Tag
The <spacer> element is used to insert spaces on the web page.
Sometimes you may need to put space into your document. Often this is done with the use of invisible images that can be fully transparent, or have the same color as the background. However, these methods aren’t reliable. For that, you can use the <spacer> element to include blank space in a document. It is like an image, but actually, there isn’t a picture there.
You should specify <spacer> as one of the following types: horizontal, vertical, and block, which can be both horizontal and vertical. To do this, use the type attribute.
There are many options for adding and controlling blank space on the web-page:
- The <p> tag creates a paragraph break.
- The <br> tag indicates a line break.
- The <pre> tag is used with a preformatted text. It instructs the browser that the text should appear exactly as it is in the HTML file, including blank lines and spaces.
- The character creates non-breaking space.
- The 	 and 	 characters create tab spaces in HTML. But they can't be used independently.
- You can also add space around a text with CSS.
The <spacer> tag is an empty element, the closing tag </spacer> isn’t required.
Example of the HTML <spacer> tag:
<html> <head> <title>Title of the document </title> </head> <body> <div style="display: block; text-align: center;"> PageUp↑ <br> ←Home <spacer type="block" width="100" height="100" align> ♢ </spacer> End→ <br> PageDown↓ </div> </body> </html>
|align||align||Defines the alignment of the element relative to the content.|
|height||height||Defines the height of empty space in pixels.|
|size||size||Defines the pixel number of empty space, depending on the type attribute.|
|Indicates the element type.|
|width||width||Defines the width of an empty space in pixels.|