Name
HEIGHT, WIDTH — NN 2 IE 3 HTML 3.2
Synopsis
WIDTH=”pixels"
HEIGHT=”pixels"
Required
The size that a Java applet 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, letting the applet’s own user
interface design determine the height and width of its visible
rectangle. As with images, however, it is more efficient for the
browser’s rendering engine when you explicitly specify the
object’s dimensions. Make a habit of supplying these values for
all applets, as you should for all images or other visible external
objects.
Example
<APPLET CODE="ScriptableClock.class" WIDTH=400 HEIGHT=50> </APPLET>
Value
Positive integer pixel values (optionally quoted). You cannot entirely hide an applet by setting values to zero, but you can reduce its height and width to one pixel in each dimension. If you want to hide an applet, do so with DHTML by setting its positioning display attribute to none.
Default
None.
Object Model Reference
- IE
[window.]document.applets[i].height
[window.]document.appletName.height
[window.]document.applets[i].width
[window.]document.appletName.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.