HTML Pitfalls

  1. The typo. One small typing mistake on an HTML tag, and the rest of your page can become garbled. Make sure to include all your angle brackets and other punctuation.

  2. Leaving out a required closing tag. If you don't put the closing tag for a formatting element, the browser doesn't know when to stop applying it.

  3. Nesting errors. If you start one tag inside another, you must close it before you close the first. For example:

   <DIV ALIGN=center><B>This text is bold and centered.</B></DIV> is correct.
   <DIV ALIGN=center><B>This text is bold and centered.</DIV></B> is not.

   One way to avoid nesting errors is to use indents:
   <DIV ALIGN=center>
           <B>This text is bold and centered.</B>
   </DIV>