HTML vs XHTML
Review the differences between HTML and XHTML in a structured comparison table, then continue with related interview questions, quizzes, and similar topic comparisons.
Difference Between
HTML vs XHTML - A key comparison and difference of the topics or subjects that will help you understand which is best for your use case. Check out to compare XHTML and HTML as very common job interview questions.
Difference between HTML and XHTML
HTML vs XHTML - A key comparison and difference of the topics or subjects that will help you understand which is best for your use case. Check out to compare XHTML and HTML as very common job interview questions.
|
HTML
|
XHTML
|
|---|---|
| HTML is Hypertext Markup Language. | XHTML is Extensible Hypertext Markup Language. |
| An application of SGML. | An application of XML. |
| Can have empty/open tags e.g. <br>, <p>. | All the unclosed tags must be closed e.g. <br/>, <p></p>. |
| No hard rule on structures of the elementse.g. <p><b>The difference</p></b>. | Structure of the elements should be followed e.g. <p><b>The difference</b></p>. |
| Attributes have quotes as optional e.g. <font color=#ff0000>. | Attributes have quotes mandatory e.g. <font color=”#ff0000?>. |
| Attributes values not significant e.g. <input type=”checkbox” checked>. | Attributes values are important e.g. <input type=”checkbox” checked = “checked”>. |
| Case insensitive:The tags and attributes can be of uppercase or lowercase as per the preference. | Case sensitive:The tags and attributes must be of lowercase. |
| All the content can be put under body element. | All the content has to be put in blocks (p, under body element. |
| HTML is not mandatory for one root element. | XHTML documents must have one root element. |
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Related differences
Explore similar comparisons connected to HTML and XHTML for broader context and interview preparation.
Get differences from below
Browse all available topic comparisons below, or use the search field above to narrow the list instantly.