Web Hosting Directory | Web Hosting Resources | Webmaster Resources | Domain Tools | Search Engine Marketing | Forums
  Signup
Today: 1,131   Yesterday: 1,240   Max: 1,872   Total: 364,531   Current Users : 13 (Member 0) 
DOMAIN TOOLS

WEBMASTER TOOLS

RELATED ARTICLES

SUBMIT AN ARTICLE

Write for us and get publicity, link to your website, and best of all get paid. Please visit our writers page for details.


LINK TO US

Link to us and earn points for each visitor you bring to us. Please visit our link partner page for details.

 

Is the P Endtag Required?

W3C says of </P>: "The end tag is optional as it can always be inferred by the parser." This means that a new <P ...> implies the end of the previous <P ...> (and any alignment set by the previous <P ...>).

Any other block level element, such as <HR ...> or <BLOCKQUOTE ...> should also end the paragraph. However, it doesn't always work out that way. Some browsers, for example, will right-align the text even after a table. In the following example, MSIE renders the "after the table" part as right aligned, while Netscape renders is as left aligned:

<P STYLE="text-align:right">
before the table

<TABLE BORDER>
<TR> <TH>Dawn</TH>   <TD>1-2028</TD> </TR>
<TR> <TH>Mary K</TH> <TD>1-4952</TD> </TR>
</TABLE>

after the table

Screen shot of MSIE's rendering of the example
MSIE's rendering
Screen shot of Netscape's rendering of the example
Netscape's rendering
If you set the alignment or other style property for a paragraph element it's best to use </P>. If you never use set any styles then you can generally ignore </P>.

See W3C's specs for paragraphs for more information on this topic.



Copyright 1997-2002 Idocs, Inc. Written by Miko Sullivan.

 
 
What is your major source of website traffic?
 
 
 
 
 
 

ADVERTISEMENT

 
Cheap Web HostingBudget Web HostingEcommerce Web Hosting
Link to UsLink ExchangeAdvertisePrivacy PolicyTerms Of ServiceAbout UsContact UsSitemap
Copyright © 2006 - 2008 Broadband Media, Inc. All rights reserved.