Like This Site? 
 
RSS Feed Follow Us 

on Twitter! Be Our Fan!

XHTML vs HTML

Share this post!
 Vote this!

Due to the fact that XHTML is an XML application, certain practices that were perfectly legal in SGML-based HTML 4 must be changed. You already have seen XHTML syntax in previous chapter, so differences between XHTML and HTML are very obvious:

XHTML documents must be well-formed:

Well-formedness is a new concept introduced by XML. Essentially this means that all elements must have closing tags and that all the elements must nest properly.
CORRECT: nested elements.
<p>Here is an emphasized <em>paragraph</em>.</p>
INCORRECT: overlapping elements.
<p>Here is an emphasized <em>paragraph.</p></em>  more...

0 comments:

Post a Comment