Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Image border property

Image border property

Image Object Reference Image Object


Definition and Usage

The border property sets or returns the value of the border attribute of an image.

The border attribute specifies the width of the border around the image.

Note: By default an image has no border (unless the image itself comes with a border).

Syntax

imageObject.border=

pixels


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the border property


Example

Example

Add an image border:

Computerman



Try it »


Image Object Reference Image Object