Setting the Left Margin

| Back | Home | Next |

Web pages begin the text by default at the left edge of your browser window. Oftentimes, you may want an empty "gutter" to the left, so that text moves to the right, and appears "less crowded." Just as on a printed page, this empty space on the left side of the browser window is referred to as the left margin.

To precisely set the left margin to a specific number of pixels use the following example:

<BODY LEFTMARGIN="50">

This page was set using a LEFTMARGIN of 0 pixels to take advantage of the entire width of the screen. The empty margin is visible in Internet Explorer because the use of LEFTMARGIN="0" forces a narrower margin than the default of none. Netscape does not support the LEFTMARGIN attribute.

In setting the margin to pixels, keep in mind that for all monitors, 72 pixels is displayed as approximately one inch. So, setting the left margin to one inch would be:

<BODY LEFTMARGIN="72">