XHTML5: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
Line 3: Line 3:
XHTML5 is an [[XML]] variant of [[HTML5]].
XHTML5 is an [[XML]] variant of [[HTML5]].


With respect to HTML5 it differs in three ways:
With respect to HTML5 it differs in four related ways:
* (True) XHTML5 must be served as XML, e.g. ''application/xhtml+xml'' or ''application/xml''  
* (True) XHTML5 must be served as XML, e.g. ''application/xhtml+xml'' or ''application/xml''. This will have the important consequence that its contents will be processed by an XML processor.
* You may add your own XML languages (cannot be done with HTML5)
* You may add your own XML languages within their own namespaces (cannot be done with HTML5)
* Contents must be well-formed and (probably) valid.
* XHTML5 ''is'' XML. Therefore, contents must be well-formed and (probably) valid.


As of March 2013, XHTML5 doesn't seem to be implemented, but I'd have to check this - [[User:Daniel K. Schneider|Daniel K. Schneider]] ([[User talk:Daniel K. Schneider|talk]]) 18:33, 8 March 2013 (CET)
As of March 2013, XHTML5 doesn't seem to be implemented, but I'd have to check this - [[User:Daniel K. Schneider|Daniel K. Schneider]] ([[User talk:Daniel K. Schneider|talk]]) 18:33, 8 March 2013 (CET)

Revision as of 19:42, 8 March 2013

Introduction

XHTML5 is an XML variant of HTML5.

With respect to HTML5 it differs in four related ways:

  • (True) XHTML5 must be served as XML, e.g. application/xhtml+xml or application/xml. This will have the important consequence that its contents will be processed by an XML processor.
  • You may add your own XML languages within their own namespaces (cannot be done with HTML5)
  • XHTML5 is XML. Therefore, contents must be well-formed and (probably) valid.

As of March 2013, XHTML5 doesn't seem to be implemented, but I'd have to check this - Daniel K. Schneider (talk) 18:33, 8 March 2013 (CET)

Example

XHTML5 code may look like this:

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <meta charset="utf-8" />
  <title>XHTML5</title>
 </head>
 <body>
  ... is preparing its comeback and it may even become stronger than before 
since after many many years IE explorer managed to implement XHTML 1...
 </body>
</html>
  • Notice the namespace declaration

Links

Manuals and Specs

Living Standard HTML5 page).


Tutorials

  • Thinking XML: The XML flavor of HTML5, 6 recommendations for developers using the next generation of the web's native language, IBM Developer works 2010. Basically it tells how to use XHTML5 in the same way that XHTML was used, i.e. just served as HTML....