HTML <object> width attribute

Definition and usage

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

Example

Embedded image, height 300 pixels, width 200 pixels:

<object data="tulip-yellow.jpg" width="600" height="400"></object>

Try it yourself

Syntax

<object width="pixels">

Attribute value

Value Description
pixels Width of the object, in pixels (for example, width="100").

Browser support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support