www.pickatutorial.com Computer Tutorials
Your Ad Here


XHTML Common Mistakes, Learn XHTML online for free, Free online Extensible HyperText Markup Language Tutorial...

Lessons XHTML Common Mistakes Bookmark and Share
Tutorial Home
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
In this lesson we will discuss some of the common mistakes in the usage of XHTML:
  1. Not closing empty elements (elements without closing tags in HTML)
    • Incorrect: <br>
    • Correct: <br /> or <br></br>
      Any of these is acceptable in XHTML: <br></br>, <br/>, and <br />.

  2. Not closing non-empty elements
    • Incorrect: <strong>This text is bold.<p>This text is also bold.
    • Correct: <p>This is a paragraph.</p><p>This is another paragraph.</p>

  3. Improper nesting of tags
    • Incorrect: <em><strong>This is some text.</em></strong>
    • Correct: <em><strong>This is some text.</strong></em>

  4. Using attribute values without quotes or wrong quotes
    • Incorrect: <td rowspan=3>
    • Incorrect: <td rowspan='3">
    • Correct: <td rowspan="3">
    • Correct: <td rowspan='3'>

  5. Using the ampersand character outside of entities
    • Incorrect: <title>Cars & Trucks</title> (This is also invalid in HTML)
    • Correct: <title>Cars &amp; Trucks</title>

Our XHTML Tutorial ends here. How did you find it? Please let us know at pickatutorial@yahoo.com | Tutorial author: farooq_fl@yahoo.com

More HTML / XHTML Tutorials



Home - Advertise - Contact - Disclaimer - About Us
© Since 2006 pickatutorial.com -- All Rights Reserved.