Image.hspace

JavaScript 1.1+, JScript 1.0+ Nav3+, IE 3+, Opera3+ Syntax

							image.hspace

Description

The hspace property of the Image object specifies the number of extra pixels that should appear on the left and right of the image. This property can only be set by the HSPACE attribute of the <img> tag.

Example

Listing 7.306 demonstrates the hspace property.

Listing 7.306 Example of hspace Property
 <html> <head> <title>Example of hspace property</title> </head> Text to left of image. <img name="circle" src="circle.gif" HSPACE=100> Text to right of image.<br> <script language="JavaScript"> <!-- Hide //Display value of hspace property document.write("The hspace property of the image is "); document.write(document.circle.hspace); //Hide End ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.