English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The hspace attribute specifies the space on the left and right of the object.
Left and right margins are 100 pixel object:
<!DOCTYPE html> <html> <head> <title>HTML: <object> hspace attribute - Basic Tutorial Website (oldtoolbag.com)/title> </head> <body> <h4>Object without hspace:</h4> <p><object width="150" height="150" data="bookmark.swf"></object> This is some text. This is some text. This is some text./p> <h4>Object with hspace:</h4> <p><object width="150" height="150" data="bookmark.swf" hspace="100"></object> This is some text. This is some text. This is some text./p> </body> </html>Test to see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the hspace attribute.
HTML5 The <object> hspace attribute is not supported. Please use CSS instead.
In HTML 4.01 In the <object>, the hspace attribute is deprecated.
The hspace attribute specifies the space on the left and right of the object.
In HTML 4.01 In the <object>, the hspace attribute is deprecated. Please use CSS instead.
CSS Syntax: <object style="margin: 0px 100px">
CSS Example: <object> with margin
In our CSS tutorial, you can find more about margin property. Details.
<object hspace="pixels">
Value | Description |
---|---|
pixels | The space on the left and right of the object, in pixels. |