HTML Code Tutorial

Tutor Ebook Download

Division Tag

The division tag <div></div> can be used much like tables or frames for structuring your HTML pages. Pages built in this fashion are more search engine spider friendly than pages built using other methods.

Side by Side Paragraphs

How can you place two paragraphs side by side on the same page without using tables? Use the divison tag with float and width attributes.

When placing keywords in your meta tags be sure to use synonyms. For search engines like Google that don't use meta tags place the same words in your page body.

If you are planning on doing business on the world wide web, don't overlook normal means of advertising. Include the URL of your site in yellow page listings or other advertising media.



Code without text:
<div STYLE="float : left; width : 50%">
<p STYLE="padding-right : 1em">Text</div>
<div STYLE="float : right; width : 50%">
<p STYLE="padding-left : 1em">Text</div>

Place a <br clear="all"> tag after the last adjacent division.

Setting up Adjacent Divisions

For a simple demonstration and some basic rules for dividing a page into 2 horizontal adjacent sections View This Page

For a basic 3 column set up see: 3 Columns No Tables

For a demonstration of dividing pages with the division tag , using borders and nesting divisions, visit division_demo.html.

To close the gaps between vertical adjacent divisions, set top and bottom margin properties to zero.

Other Uses

The division tag can be useful when you want to use different style settings for different parts of the same page. Use the ID attribute, then place your style sheet settings in the head section accordingly. You could in theory have two or more completely different sets of style sheets on the same page using this technique.

Note: The division tag also accepts the align attribute.

Attention: If you use the division tag to structure your web pages, be sure to test them at various monitor resolutions. This method of creating web pages is for experienced users.

Take a quiz. Take a Quiz on this Information.

Be sure to read the demo pages before attempting this Quiz.



CGI Online
How to Create a Website -Tutorial
Main Website


This Free HTML Tutorial
is provided by Net Success 2000 Plus Inc.
PO Box 1508
Somerset, KY 42502
Last Modified: September 26, 2007

HTML Codes Tutor Ebook