Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is the different between HTML and XHTML?

0
Posted

What is the different between HTML and XHTML?

0

XHTML is *not* a new version of HTML. It is a formulation of (the *same* version of) HTML in XML. XHTML1 is HTML4 expressed in XML. HTML5 is *not* competing with XHTML. HTML5 can be expressed in XML — just like HTML4 can be expressed in XML — and is referred to as XHTML5. Moreover, The HTML version of HTML5 allows syntax such as /> to ease migration from “XHTML-as-text/html” (which I suspect is what you are discussing here) to HTML5. So it should be trivial to migrate even if you use XHTML-like syntax. No need to worry about it. BTW, your template doesn’t tell browsers that the document is XHTML not HTML. To do that, the server must declare an XML MIME type for the file. If you use text/html, browsers will interpret it as HTML, regardless of what it looks like.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123