• Facebook Rocks

    Facebook is the best social networking website. ...

  • Google Plus

    Sign up for google plus and see the +1 magic ...

  • Twitter

    twitter.com tweet everything in just one click Sign Up today. ...

  • Mashable

    Mashable.com Latest Web Technology.

  • Wordpress

    Wordpress.org Simple and very Social, Download now ...

Difference Between XHTML and HTML4

HTML is the Hyper Text Markup Language which is rendered by any web browser you use to visit any website or web application. Whatever programming language, whatever platform a website or web application uses, it drills down to HTML only for your browser. So HTML is the building block of the World Wide Web which has not seen much significant improvement during last 2 decades except the Extensible Hyper Text Markup Language - the XHTML.

Here are the very basic differences between HTML and XHTML -

1) All documents must be well formed and properly nested

<p>The food is <em>delicious</em></p> - Correct.
<p>The food is <em>delicious</p></em> - Wrong.

2) Elements and Attributes must be in lowercase


<li> will be used instead of <LI> and the two are much different - Correct.

3) XHTML Documents and every content section must have one container

<html>
<head></head>
<body></body>
</html>

<p>The food is delicious</p> <p>I am hungry</p> - Correct.
<p>The food is delicious</p> I am hungry - Wrong.

4) Attribute values must be quoted

<td rowspan="3"> - Correct
<td rowspan=3> - Wrong

5) Empty Elements must either have an end tag or the start tag must end with />

<hr></hr> or <br /> <hr /> - Correct
<br> <hr> - Wrong.

Though at the end of the day we have a new player in the game which is being called as HTML5 - a wonder in HTML technology, the movement World Wide Web should have seen much ago.