Name

TOPMARGIN — NN n/a IE 3 HTML n/a

Synopsis

TOPMARGIN=”integer"

Optional

Establishes the amount of blank space between the top edge of the content area of a window and the top edge of the content. This attribute offers somewhat of a shortcut to setting the margin-top style sheet attribute for the BODY element. As the outermost parent container in the element hierarchy, this attribute setting fixes the top margin context for all nested elements in the document. On both Windows and Macintosh versions, setting the TOPMARGIN attribute to zero or an empty string ("") pushes the content to the very top of the document content region.

Example

<BODY TOPMARGIN="0">... </BODY>

Value

A string value of the number of pixels of clear space at the top of the document. A value of an empty string is the same as zero.

Default

15 (Windows); 8 (Macintosh).

Object Model Reference

IE

[window.]document.body.topMargin

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.