Home arrow HTML arrow Page 2 - HTML Methods to Remember and Use Effectively
HTML

HTML Methods to Remember and Use Effectively


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.

Author Info:
By: Stephen Davies
Rating: 3 stars3 stars3 stars3 stars3 stars / 15
December 05, 2007
TABLE OF CONTENTS:
  1. · HTML Methods to Remember and Use Effectively
  2. · Page Layout
  3. · Text Enhancing
  4. · Use of Classes

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
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:

<img src="myimage.gif" width="2" height="200" border="0">

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 -- &nbsp;. For an indent of three spaces, we will use this code: <p>&nbsp; &nbsp; &nbsp; text</p>. To add blank lines above or below each paragraph use this code: <p>&nbsp</p> for each blank line we want.


blog comments powered by Disqus
HTML ARTICLES

- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5
- BBC Adopts HTML 5, Mozilla Addresses Issues
- Advanced Sticky Footers in HTML and CSS
- HTML and CSS Sticky Footers
- Strategy Analytics Predicts HTML5 Phones to ...
- HTML5 Guidelines for Web Developers
- Learning HTML5 Game Programming
- More Engaging CSS3 and HTML Background Effec...
- Engaging HTML and CSS3 Background Effects
- More Web Columns with CSS3 and HTML
- Columns with CSS3 and HTML
- Creating Inline-Block HTML Elements with CSS
- Drag and Drop in HTML5: Parsing Local Files

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 5 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials