hspace (HTML attribute)

Depr. Version
Yes HTML 2


hspace="surrounding horizontal space in pixels"


When an applet is aligned left or right, text will flow around the applet but with no space between it and the applet. The hspace (and related vspace) attribute provides a bit of ‘breathing space’, but it will apply a space on both sides of the applet which is not entirely flexible.


The hspace attribute set to "30" pixels around a left-aligned applet:

<applet code="ticker.class" align="left" hspace="30">


A number representing the width of spacing either side of the applet in pixels.


Although support for this attribute is good, it’s now deprecated, and is highly presentational in its nature. The desired visual effects can all be achieved with CSS and, as such, this attribute shouldn’t be used—it’s presented here for informational purposes only.

User-contributed notes

There are no comments yet.

Related Products