VOOZH about

URL: https://www.geeksforgeeks.org/html/html-object-hspace-attribute/

⇱ HTML | <object> hspace Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML | <object> hspace Attribute

Last Updated : 17 Apr, 2025

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.  

Output: 

👁 Image


Example 2:

Output: 

👁 Image


Supported Browsers: The browsers supported by HTML <object> hspace Attribute are listed below: 

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari


Comment
Article Tags: