View Single Post
Old 03-30-2011, 06:24 AM   #41
lindsayw
Author from pBook days
lindsayw is clearly one to watchlindsayw is clearly one to watchlindsayw is clearly one to watchlindsayw is clearly one to watchlindsayw is clearly one to watchlindsayw is clearly one to watchlindsayw is clearly one to watchlindsayw is clearly one to watchlindsayw is clearly one to watchlindsayw is clearly one to watchlindsayw is clearly one to watch
 
lindsayw's Avatar
 
Posts: 49
Karma: 10782
Join Date: Mar 2011
Location: Australia
Device: Kindle-3-Keyboard; 8" Android Tablet
I will try to dig up a reference from among the myriad sites I have visited but, from memory, the xhtml rule is simple: any "empty" tag (that doesn't ever have content) may be self-closed. Any tag that MIGHT have content must be explicitly closed. The <a> tag might have content and, in fact, normally has an href="xxxx" element, so it needs a separate closing tag to delineate the operating element (the link). Tags such as <br> or <hr> never have content so they should be: <br /> or <hr />. <p> ALWAYS has content, so needs a </p> to delineate the scope of the paragraph.
lindsayw is offline   Reply With Quote