- HTML Tutorial
- HTML - Home
- HTML - Introduction
- HTML - Editors
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Headings
- HTML - Paragraphs
- HTML - Fonts
- HTML - Blocks
- HTML - Style Sheet
- HTML - Formatting
- HTML - Quotations
- HTML - Comments
- HTML - Colors
- HTML - Images
- HTML - Image Map
- HTML - Iframes
- HTML - Phrase Elements
- HTML - Meta Tags
- HTML - Classes
- HTML - IDs
- HTML - Backgrounds
- HTML Tables
- HTML - Tables
- HTML - Headers & Caption
- HTML - Table Styling
- HTML - Table Colgroup
- HTML - Nested Tables
- HTML Lists
- HTML - Lists
- HTML - Unordered Lists
- HTML - Ordered Lists
- HTML - Definition Lists
- HTML Links
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML Color Names & Values
- HTML - Color Names
- HTML - RGB
- HTML - HEX
- HTML - HSL
- HTML Forms
- HTML - Forms
- HTML - Form Attributes
- HTML - Form Control
- HTML - Input Attributes
- HTML Media
- HTML - Video Element
- HTML - Audio Element
- HTML - Embed Multimedia
- HTML Header
- HTML - Head Element
- HTML - Adding Favicon
- HTML - Javascript
- HTML Layouts
- HTML - Layouts
- HTML - Layout Elements
- HTML - Layout using CSS
- HTML - Responsiveness
- HTML - Symbols
- HTML - Emojis
- HTML - Style Guide
- HTML Graphics
- HTML - SVG
- HTML - Canvas
- HTML APIs
- HTML - Geolocation API
- HTML - Drag & Drop API
- HTML - Web Workers API
- HTML - WebSocket
- HTML - Web Storage
- HTML - Server Sent Events
- HTML Miscellaneous
- HTML - MathML
- HTML - Microdata
- HTML - IndexedDB
- HTML - Web Messaging
- HTML - Web CORS
- HTML - Web RTC
- HTML Demo
- HTML - Audio Player
- HTML - Video Player
- HTML - Web slide Desk
- HTML Tools
- HTML - Velocity Draw
- HTML - QR Code
- HTML - Modernizer
- HTML - Validation
- HTML - Color Picker
- HTML References
- HTML - Cheat Sheet
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
- HTML Resources
- HTML - Quick Guide
- HTML - Useful Resources
- HTML - Color Code Builder
- HTML - Online Editor
HTML - <spacer> Tag
HTML <spacer> tag is used to specify a whitespace on the web pages by replacing the effect of adding small image. We can use this tag to create blank space if we needs to, however this tag is not reliable or future proof as it is removed in HTML5.
This tag is deprecated in HTML5, we can use HTML <pre> or <br> tag according to the needs or we can use CSS margin or padding property to generate white space around the small images or where we need.
Syntax
<spacer type="" size="">
Attribute
HTML spacer tag supports Global and Event attributes of HTML. Accepts some specific attributes as well which are listed below.
Attribute | Value | Description |
---|---|---|
type | vertical horizontal block |
Specify whether the spacer will be horizontal, vertical, or block(Deprecated). |
size | number | Specifies the number of pixels tall or wide the spacer will be This attribute is only used if the spacer type is "horizontal" or "vertical." If the spacer type is "block," then the width attribute is used(Deprecated). |
width | number | The width attribute is used when the spacer type = "block". Between the quotes specify a pixel value for the width of the block(Deprecated). |
height | number | The height attribute is used when the spacer type = "block". Between the quotes specify a pixel value for the height of the block(Deprecated). |
align | left right center |
The align tag is used to specify the alignment of the block of white space. Valid alignments are left, right, and center(Deprecated). |
Examples of HTML spacer Tag
Bellow examples will illustrate the usage of spacer tag. Where, when and how to use spacer tag to create whitespace.
Create Whitespace on Paragraph
Consider the following example, where we are going to use the spacer tag to create white space at a certain place of the pragrapgh.
<!DOCTYPE html> <html> <head> <title>HTML spacer Tag</title> </head> <body>Create some space <spacer type = "block" width = "50" /> here.
</body> </html>
Create Whitespace on Images
Consider the following example, where we are going to use the spacer tag to create white space on around the image.
<!DOCTYPE html> <html> <head> <title>HTML spacer Tag</title> </head> <body> <img src="/html/images/html-mini-logo.jpg" alt="HTML Logo"> </body> </html>
Supported Browsers
Tag | |||||
---|---|---|---|---|---|
spacer | No | No | No | No | No |
To Continue Learning Please Login
Login with Google