Setting Margins in HTML

How many times have you loaded a web site with a colored side bar to find that the text pushes right up to the very edge of the bar making it hard to read?

Microsoft IE, 3x, 4x, and 5x, and Netscape 4.x browsers all support a new tag DIV

It means a Divisional Block of text. It is a container element. You can use it to suggest margins. Here is an example:

<div style="margin-left: 2mm; margin-right: 2mm; font-weight: 800;"> some text;</div>

This example shows how to use the DIV with INLINE CSS (Cascading Stylesheets) to suggest margins

The same information could be included with a <P> container. Example:

<p style="margin-left: 2mm; margin-right: 2mm; font-weight: 800;">

Suggesting a "font-weight" for either element basically means how heavy/dark you would like the font in the container element displayed. In these examples I have suggested a weight of 800. This would produce a result similar to enclosing text within <B></B>

Click Here for more information about Stylesheets

| Back to Article Index |

Copyright © All Rights Reserved. The information/images on this website
may not be reproduced or republished by anyone without permission.