HTML | <object> hspace Attribute Last Updated : 17 Apr, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report The HTML <object> hspace Attribute is used to specify the number of whitespaces on the left and right side of an object. Syntax: <object hspace="pixels"> Attribute: pixels: It specifies the number of whitespaces on the right and left side of an object in terms of pixels.Note: The <object> hspace Attribute is not supported in HTML 5.Below examples illustrate the <object> hspace attribute in HTML:Example 1: In this example the object with 50px margin on both side. HTML <!DOCTYPE html> <html> <head> <title> HTML object hspace Attribute </title> </head> <body> <center> <h1 style="color:green">GeeksforGeeks</h1> <h4> HTML <object>hspace Attribute </h4> <br> <object data= "https://www.geeksforgeeks.org/wp-content/uploads/Geek_logi_-low_res.png" width="350px" height="150px" hspace="50"> GeeksforGeeks </object> </center> </body> </html> Output: Example 2: HTML <!DOCTYPE html> <html> <head> <title> HTML object hspace Attribute </title> </head> <body> <center> <h1 style="color:green">GeeksforGeeks</h1> <h4> HTML <object>hspace Attribute </h4> </center> <br> <div><b>With 50px hspace:</b> <object hspace="50"> GeeksforGeeks </object> <object hspace="50"> A Computer Science Portal </object> </div> <br><br> <div><b>Without hspace:</b> <object> GeeksforGeeks </object> <object> A Computer Science Portal </object> </div> </body> </html> Output: Supported Browsers: The browsers supported by HTML <object> hspace Attribute are listed below: Google ChromeInternet ExplorerFirefoxOperaSafari Comment More infoAdvertise with us Next Article HTML | hspace Attribute M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-Attributes Similar Reads HTML <object> hspace Attribute The HTML <object> hspace Attribute is used to specify the number of whitespaces on the left and the right side of the object. Syntax: <object hspace="pixels"> Attribute Value: pixels: It specifies the number of whitespaces in terms of pixels.Note: The <object> hspace Attribute is 1 min read HTML | <object> height Attribute The HTML <object> height attribute is used to specify the height of the object element in terms of pixel. Syntax: <object height="pixels"> Attribute Values: pixels: It holds the height of the object in terms of pixels. Below example illustrates the <object> height attribute in HTML 1 min read HTML | <img> hspace Attribute The HTML <img> hspace attribute is used to specify the number of whitespaces on the left and the right side of the image. The hspace attribute is not supported by HTML 5 you can use CSS there. Syntax: <img hspace="pixels"> Attribute Values: pixels: It specifies the number of whitespaces 1 min read HTML | <object> align Attribute The HTML <object> align Attribute is used to specify an alignment for an object Element. It is an inline element means that can not insert a new line on a page. The text and other elements can also wrap around it. Note: This attribute is not supported by HTML5. Syntax: <object align="left | 1 min read HTML <object> width Attribute The HTML <object> width attribute is used to specify the horizontal dimension of the embedded object, defining the width of the displayed content within the webpage. Syntax: <object width="pixels">Attribute Values: pixels: It holds the width of the object in terms of pixels.The below exa 1 min read HTML <object> vspace Attribute The HTML <object> vspace Attribute is used to specify the number of whitespace on the bottom and top side of an object.Syntax: <object vspace="pixels"> Attribute: pixels: It specifies the number of whitespaces on the top and bottom of an object in terms of pixels. Note: The <object 1 min read Like