HTML <object> widthAttribute

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

Example

Flash animation with height and width of 400 pixels:

<object data="helloworld.swf" width="400" height="400"></object>

Try it yourself »

Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the width attribute.


Definition and usage

The width attribute specifies the width of the object in pixels.


Differences between HTML 4.01 and HTML5

None.


Syntax

<object width="pixels">

Attribute value

Value Description
pixels The width of the object in pixels (e.g., width="100").


HTML object 标签参考手册HTML <object> tag Other extensions