HTML | <object> hspace Attribute Last Updated : 17 Apr, 2025 Comments Improve Suggest changes 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 | align 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 | <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> 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 HTML | Marquee hspace attribute The Marquee hspace attribute in HTML is used to set the horizontal margin. A given value is used to set the space between the marquee element and other contents. Note: This attribute is not supported by HTML5. Syntax: <marquee hspace="px/%" > Attribute value: px: Specify horizontal space aroun 1 min read HTML <html> xmlns Attribute The HTML <html> xmlns Attribute is used to specify the XML namespace for a document. This attribute is mainly required in XHTML, not valid in HTML 4.01, and optional in HTML 5. Syntax<html xmlns="https://www.w3.org/1999/xhtml/"> Attribute ValuesValueDescriptionhttps://www.geeksforgeeks.o 1 min read Like