Tuesday, July 21, 2015


   I will take this blog post to point you what all are the key differences between an XML and HTML  and what all are the rules driving both of them .

1. XML is case sensitive while HTML is not.
    <BR> and <br> are two different tags for xml but html consider both as one.

2. Close tags are not mandatory for HTML .
    HTML parser is not so strict and it will not complain you if you have missed a closing tag. It understands from the context. However XML is strict with respect to closing tags.

3. An Attribute without a value is valid for HTML  but not for an XML
   <table name="table1" visible>  is a valid HTML but not a valid XML . To be a valid xml this should be  <table name="table1" visible="true">

4. Attribute values should be given inside a "double quote" for XML, However HTML doesnt stick to this rule <table name="table1" visible=true> is a valid HTML.

Hope it helps . Happy coding :) 

No comments:

Post a Comment