Easy Tutorial
❮ Tag Blockquote Av Event Loadedmetadata ❯

HTML <object> hspace Attribute

HTML <object> Tag

Example

An object with 100 pixels of margin on the left and right:


Browser Support

All major browsers support the hspace attribute.


Definition and Usage

In HTML 4.01, the hspace attribute for <object> is deprecated.

The hspace attribute specifies the white space to the left and right of an object.


Compatibility Notes

In HTML 4.01, the hspace attribute for <object> is deprecated. Use CSS instead.

CSS syntax: <object style="margin: 0px 100px">

CSS Example: <object> with Margin

In our CSS tutorial, you can find more details about the margin property.


Syntax

Attribute Values

Value Description
pixels The white space to the left and right of the object, in pixels.

❮ Tag Blockquote Av Event Loadedmetadata ❯