Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | <spacer> tag

  • Last Updated : 27 Aug, 2019

The HTML <spacer> tag is used to create some white-space. This tag is history in HTML5, there is no more support in HTML5 also this tag does not support by any major browsers.
Syntax:

<spacer type="" size="">

Attribute:

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

  • type: This attribute holds the value for the type of space horizontal, vertical or block.
  • size: This attribute holds a number of pixels for the horizontal or vertical type of spacer.
  • height: This attribute holds the pixel number for block type spacer.
  • width: This attribute holds the pixel number for block type spacer.
  • align: This attribute holds the alignment of the block of white-space.

Below example illustrate the HTML <spacer> tag:
Example:




<!DOCTYPE html>
<html>
  
<head>
    <title>HTML <spacer> Tag</title>
    <style>
        h1 {
            color: green;
        }
    </style>
</head>
  
<body>
    <center>
        <h1>GeeksforGeeks</h1>
        <h2>HTML <spacer> tag</h2>
        <p>A Computer Science Portal
            <spacer type="block" width="50" /> for Geeks</p>
  
    </center>
</body>
  
</html>

Output:

Supported Browsers: The <spacer> tag does not supported by major browsers:

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!