HTML and CSS Reference
In-Depth Information
12.2.1.7. The align, class, border, height, hspace, style, vspace, and
width attributes
As with the corresponding attributes for the
<img>
tag, several attributes
let you control the appearance of the
<object>
display region. The
height
and
width
attributes control the size of the viewing region. The
hspace
and
vspace
attributes define a margin around the viewing region. The
value for each dimension attribute should be an actual number of pixels.
The
align
attribute determines how the browser aligns the region in con-
baseline
,
bottom
, or
absbottom
to align the object display space with ad-
jacent text, or
left
and
right
alignments for wraparound content.
[*]
The
align
attribute is deprecated in the HTML 4 and XHTML standards because of the CSS stand-
ard, but it is still popularly used and supported.
The display region's dimensions often must match some other applet re-
quirement, so be careful to check these values with the applet program-
mer. Sometimes the applet may scale its display output to match your
specified region.
For instance, our example clock applet might grow or shrink to fit nearly
any size display region. Instead, we might fix it to a square space, 100
x 100 pixels:
<object classid="clock.class" height="100" width="100">
</object>
As with
<img>
, use the
border
attribute to control the width of the frame
that surrounds the object's display space when you include it as part
Use the
class
and
style
attributes to control the display style for the
content enclosed by the tag and to format the content according to a