Name

HEIGHT, WIDTH — NN 4 IE 3 HTML 4

Synopsis

HEIGHT=”length"
WIDTH=”length"

Required

The size that an embedded object (or its plugin control panel) occupies in a document is governed by the HEIGHT and WIDTH attribute settings. Some browser versions might allow you to get away without assigning these attributes and letting the plugin’s own user interface design determine the height and width of its visible rectangle. It is best to specify the exact dimensions of a plugin’s control panel or the data (in the case of images) whenever possible (control panels vary with each browser and even between different plugins for the same browser). In some cases, such as Navigator 4 for the Macintosh, the object may not display if you fail to supply enough height on the page. If you assign values that are larger than the actual object or its control panel, the browser reserves that empty space on the page, which could interfere with your intended page design.

Example

<OBJECT DATA="blues.aif" HEIGHT=150 WIDTH=250></OBJECT>

Value

Positive integer values (optionally quoted) or percentage values (quoted).

Default

None.

Object Model Reference

IE

[window.]document.elementID.height

[window.]document.elementID.width

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.