Friday, November 16, 2012

Answers > What Is the Different Between HTML and XHTML?

What Is the Different Between HTML and XHTML?

by nForms on April 19, 2011

I need to know what is the different between HTML and XHTML. Is XHTML have more tags than HTML.

Tags: , , , , , ,

difference between html and xforms, difference between html and xhtml

Similar XForms | XML Posts

{ 4 comments… read them below or add one }

joshn April 19, 2011 at 9:36 pm

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.

take care

Joe April 19, 2011 at 9:36 pm

HTML tags are lowercase and XHTML tags are lower case……………think thats how it works

gpm1982 April 19, 2011 at 9:36 pm

The best place to understand what’s the difference between HTML and XHTML is in Wikipedia. Go check it out here: http://en.wikipedia.org/wiki/Html

In a nutshell, HTML is extended to XHTML, hence, XHTML stands for eXtensible HTML.

Pramod April 19, 2011 at 9:36 pm

//pk

1) XHTML Elements Must Be Properly Nested
2) XHTML Elements Must Always Be Closed
3) Empty Elements Must Also Be Closed
4) XHTML Elements Must Be In Lower Case
5) XHTML Documents Must Have One Root Element

http://www.w3schools.com/XHTML/xhtml_html.asp

Previous post:

Next post: