In the years since the first development of HTML, many other computer languages have been developed to enhance the pages displayed on the Internet. These languages include JavaScript, VBS, Perl, ASP, and .Net. However, I will show you that you can enhance your web page just using HTML. This is especially important if you are new to web page development and have not had the time to learn another language.
HTML Methods to Remember and Use Effectively - Page Layout (Page 2 of 4 )
Page layout
Now that we have the right background, we need to add the content, i.e. text and graphics. We can enhance the placement of our web page content by using tables and nested tables, however we can also use a few simple HTML tags to arrange our page. The one item that we can use to affect the entire content placement is the page's margins. We need to place the following margin attributes into our body tag:
<body topmargin=# bottommargin=# leftmargin=# rightmargin=# marginheight=# marginwidth=#>, where # equals a number. We can experiment with the margins by adding different numbers to produce the alignment we want. Internet Explorer uses the first four margin attributes; Netscape only uses the last two.
We can make another enhancement to the page layout by using HTML tags to place horizontal and/or vertical lines on the page and to adjust paragraph spacing. To make a horizontal line we will use the hr tag. This tag uses the size, color, width, and noshade attributes like this: <hr width="75%" color="#FF0000" size="#"> (size can be 1 - 7). We can use the noshade attribute when we want a solid black line like this:
<hr width="100%" size="1" noshade>. The width can be either a percentage of the page or it can be in pixels.
There is no tag for producing a vertical line. Nevertheless, we can place a vertical line on our page by using a 2x2 pixel image. We can use this tag:
The width and height are in pixels. To make this work, we first will have to make a 2x2 pixel image using a graphics-editing program (it can be any color you like). Then we must upload the image file to our website image directory. This technique can also be used to make a horizontal line by changing the width and height attributes.
To indent a paragraph, or to add space above and/or below a paragraph, we must use the non-breaking space code -- . For an indent of three spaces, we will use this code: <p> text</p>. To add blank lines above or below each paragraph use this code: <p> </p> for each blank line we want.