HTML <object> borderAttribute

HTML object 标签参考手册HTML <object> Tag

Example

An <object> with a 5-pixel thick border:

<object width="200" height="200" data="helloworld.swf" border="5"></object>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the border attribute.


Definition and Usage

HTML5 does not support the <object> border attribute. Please use CSS instead.

In HTML 4.01, the border attribute of <object>is deprecated。

The border attribute specifies the width of the border around the <object>.


Compatibility Notes

In HTML 4.01, the border attribute of <object> is deprecated. Please use CSS instead.

CSS syntax: <object style="border:5px solid black">

CSS Example: an <object> with a border

In our CSS tutorial, you can find more details about theborder attribute.


Syntax

<object border="pixels">

Attribute Values

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


HTML object 标签参考手册HTML <object> Tag Other Extensions