The division tag is an easy way to specify alignment options for large sections of your document. You are required to use both an opening and a closing tag: <div> – opening tag </div> – closing tag The alignment options you can use in a DIV tag are right, left, center, and justify (version 4 browsers only). The alignment will be applied to all text and graphics between the opening and closing tags.

CODE EXAMPLE:

<div align="right">Here is some text inside a DIV tag with the alignment option set to "right."<br> <p>Text with line breaks -- as well as text inside paragraphs -- will all be aligned to the right side of the screen in this example.</p> <h2> Alignment </h2> <p>Above is an example of header that has also been aligned right along with everything else. The Div tag can make your life so much easier! </p></div>

RESULT:

Here is some text inside a DIV tag with the alignment option set to “right.”

Text with line breaks — as well as text inside paragraphs — will all be aligned to the right side of the screen in this example.

Alignment

Above is an example of header that has also been aligned right along with everything else. The Div tag can make your life so much easier!

The DIV tag is also an integral part of Cascading Style Sheets, which when fully implemented on the Web and in web browsing software, will make text and layout formatting much less tedious!