HTML 5 vs. XHTML

Joined
Jan 29, 2008
Messages
703
Reaction score
9
Points
18
Location
Mendocino, CA
I learned HTML in 2000 and sharpened my skills over the next few years, but lately have converted to XHTML. I've been hearing a lot about HTML 5 in the news, and I'm wondering if I should stick with XHTML or switch to the new HTML 5 specification. Is there any particular reason to favor one over the other?
 
Joined
Sep 19, 2008
Messages
302
Reaction score
4
Points
18
Location
Nottingham, UK
Your Mac's Specs
20" iM ac,13.3" Aluminium Unibody Macbook, iPhone 4
Taken from the HTML5 manual

1.6 HTML vs XHTML

This section is non-normative.

This specification defines an abstract language for describing documents and applications, and some APIs for interacting with in-memory representations of resources that use this language.

The in-memory representation is known as "DOM5 HTML", or "the DOM" for short.

There are various concrete syntaxes that can be used to transmit resources that use this abstract language, two of which are defined in this specification.

The first such concrete syntax is "HTML5". This is the format recommended for most authors. It is compatible with all legacy Web browsers. If a document is transmitted with the MIME type text/html, then it will be processed as an "HTML5" document by Web browsers.

The second concrete syntax uses XML, and is known as "XHTML5". When a document is transmitted with an XML MIME type, such as application/xhtml+xml, then it is processed by an XML processor by Web browsers, and treated as an "XHTML5" document. Authors are reminded that the processing for XML and HTML differs; in particular, even minor syntax errors will prevent an XML document from being rendered fully, whereas they would be ignored in the "HTML5" syntax.

The "DOM5 HTML", "HTML5", and "XHTML5" representations cannot all represent the same content. For example, namespaces cannot be represented using "HTML5", but they are supported in "DOM5 HTML" and "XHTML5". Similarly, documents that use the noscript feature can be represented using "HTML5", but cannot be represented with "XHTML5" and "DOM5 HTML". Comments that contain the string "-->" can be represented in "DOM5 HTML" but not in "HTML5" and "XHTML5". And so forth.
 
Joined
Sep 19, 2008
Messages
302
Reaction score
4
Points
18
Location
Nottingham, UK
Your Mac's Specs
20" iM ac,13.3" Aluminium Unibody Macbook, iPhone 4
If that made no sence...

XHTML will have the new features that HTML5 gains, XHTML is just the standardized version.

The only changes are new tags like <nav> and <footer> which act exactly the same as a <div> tag but basically allows search engines to know what there looking at and small screen devices render pages better... so like will help into the move to web 3.0 and beyond.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top