Saturday, July 9, 2011

Lines and Paragraphs

<DIV ...>

<DIV ...>, a block-level element, simply defines a block of content in the page. Beyond defining a block, <DIV ...> itself doesn't do anything. For example, the following code creates a <DIV ...> element with two paragraphs inside of it. Notice that you can put <P ...> elements inside a <DIV ...>.
This is stuff before the <NOBR><CODE>&#60;DIV ...&#62;</CODE></NOBR>.

<DIV>
This is stuff inside the <NOBR><CODE>&#60;DIV ...&#62;</CODE></NOBR>.

<P>

This is more stuff inside the <NOBR><CODE>&#60;DIV ...&#62;</CODE></NOBR>.
</DIV>

This is stuff after the <NOBR><CODE>&#60;DIV ...&#62;</CODE></NOBR>.
which gives us:
This is stuff before the <DIV ...>.
This is stuff inside the <DIV ...>.
This is more stuff inside the <DIV ...>.



<P ...>

Usage Recommendation
thumbs up use it
  • ALIGN: alignment of text within the paragraph
 
  • CLEAR: move past picture and other objects
<P ...> indicates the start of a new paragraph. This is usually rendered with two carriage returns, producing a single blank line in between the two paragraphs:
This is the first paragraph.

<P>

And this is the second paragraph.
produces
This is the first paragraph.
And this is the second paragraph.