[X]

The Four Attribute Margin Reset

layout hacks 1997 partly

Two attributes for Internet Explorer, two for Netscape, to get a page flush to the edge.

In 2026: Browsers still honour all four, and all four are obsolete. IE used TOPMARGIN and LEFTMARGIN, Netscape used MARGINHEIGHT and MARGINWIDTH, and nobody knew which visitor they had, so everyone shipped all four.

Where it came from: Microsoft and Netscape HTML extensions, both 1996. Neither was ever standard. MDN

<body bgcolor="#000000" text="#00FF00" link="#FFFF00" vlink="#FF00FF" alink="#FF0000"
      topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">

<!-- The 2026 version -->
<style>body { margin: 0; background: #000; color: #0f0 }</style>
sandboxed demo · breaks nothing but itselfrestart

More in layout hacks

all 20 in layout hacks › · the whole library ›