Open In App

HTML | <spacer> tag

Improve
Improve
Like Article
Like
Save
Share
Report

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:

  • 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:


Last Updated : 27 Aug, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads