HTML vs XHTML

On September 23, 2010, in Web, by Bikas

There is not much difference between HTML and XHTML and are much more similar to each other. The major differences are listed below:

  1. There should be proper nesting of XHTML tags/elements
  2. All the tags/elements must be closed else this will generate error either in the page layout or while validating the page. Example <h1>… </h1>, <p>… </p> <meta.. />, <img … />
  3. XHTML tags/elements are always written in lowercase, unlike HTML which is not case sesitive.
  4. There must be one root element for XHTML document and the child elements must be in pairs and correctly nested within their parent element. Example:
    <html>
    <head> … </head>
    <body> … </body>
    </html>

For more details please visit:
http://www.w3schools.com/xhtml/xhtml_html.asp
http://wiki.whatwg.org/wiki/HTML_vs._XHTML#Differences_Between_HTML_and_XHTML

Tagged with:
 

3 Responses to “HTML vs XHTML”

  1. Cheenmoy Prakash says:

    Thanks for sharing sir.. :) its useful

  2. Lokanath says:

    Nice post sir…so Useful.

    Sir I have a problem…
    HTML 5 now becoming so trendy but as perclient issue we can not ignore IE6(Though IE9 already launched..!!)

    Is there any trick for (a permanent solution) making HTML5 n CSS3 work in IE6..?

    I’ll be glad if u add few line regarding this issue in ur site..

    Regads

  3. Lokanath says:

    Nice post sir…so Useful.

    Sir I have a problem…
    HTML 5 now becoming so trendy but as perclient issue we can not ignore IE6(Though IE9 already launched..!!)

    Is there any trick for (a permanent solution) making HTML5 n CSS3 work in IE6..?

    I’ll be glad if u add few line regarding this issue in ur site..

    Regards

Leave a Reply