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

HTML object border Attribute

HTML The border attribute

HTML object Tag Reference  HTML tag

Example

An object with a 5-pixel thick border :

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the border attribute.


Definition and Usage

HTML5 does not support The border attribute. Use CSS instead.

In HTML 4.01, The border attribute is deprecated.

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


Compatibility notes

In HTML 4.01, The border attribute is deprecated. Use CSS instead.

CSS syntax:

CSS example: an element with a border

In our CSS tutorial, you can find more details about The border attributedetails.


Syntax

Attribute values

Value Description
pixels The width of the border, in pixels.

HTML object Tag Reference  HTML tag