HTML The hspace attribute HTML tag Example An object with 100-pixel margins on the left and right: This is some text. This is some text. This is some text. Try it » Browser support All major browsers support the hspace attribute. Definition and Usage HTML5 does not support The hspace attribute. Use CSS instead. In HTML 4.01, The hspace attribute 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 is deprecated. Use CSS instead. CSS syntax: CSS example: an object with margins In our CSS tutorial, you can find more details about The margin attributedetails. Syntax Attribute values Value Description pixels The white space to the left and right of the object, in pixels. HTML tag