Read HTML The Definitive Guide Online

Authors: Chuck Musciano Bill Kennedy

HTML The Definitive Guide (57 page)

BOOK: HTML The Definitive Guide
5.14Mb size Format: txt, pdf, ePub
ads

away from the left edge of the window.


Figure 5.23: Internet Explorer's leftmargin attribute for indenting body content
5.3.1.7 The topmargin attribute

Like leftmargin, the topmargin attribute extension currently is exclusive to Internet Explorer. It may be included in the tag to set a margin of space at the top of the document. The margin space is filled with the document's background color or image.

Body content begins flowing below the integer number of pixels you specify as the value for topmargin; a value of 0 is the default.

For example, Internet Explorer renders the following text at least 50 pixels down from the top edge of
the browser window (see Figure 5.24
):


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


Internet Explorer can give your documents a little extra headroom.


Figure 5.24: Internet Explorer's topmargin attribute for lowering body content
5.3.1.8 The style and class attributes
You also can set all the various style-related features and then some with HTML style sheets.

But although you may include the style attribute with the tag to create an inline style for the entire body content, we recommend that you set the styles for the entire document body at the document level (