English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML object width attribute

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

 HTML <object> tag

Online Example

Height 400 Pixel and width 300 pixel flash animation:

!DOCTYPE html
<html>
<head>
<title>HTML:<object> width Attribute - Basic Tutorial Network (oldtoolbag.com)</title>
</head>
<body>
<object data="bookmark.swf" width="400" height="300"></object>
</body>
</html>
Test it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the width attribute.

Definition and Usage

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

HTML 4.01 with HTML5differences

None.

Syntax

<object width="pixels">

Attribute Value

ValueDescription
pixelsObject width in pixels (e.g. width="100").
 HTML <object> tag