SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    286
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Diff between HTML and XHTML??

    Wot is the Diff between HTML and XHTML??
    [COLOR=SlateGray]
    Web Developer @ VeriQual

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    One has an X on it.

    The HTML and XHTML forum has a couple of excellent articles about XHTML vs HTML and XHTML1.0 vs XHTML 1.1 along with Frequently Asked Questions about HTML
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    One has an X on it.

    The HTML and XHTML forum has a couple of excellent articles about XHTML vs HTML and XHTML1.0 vs XHTML 1.1 along with Frequently Asked Questions about HTML
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,875
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    In terms of JavaScript, the difference between HTML and XHTML is huge.

    JavaScript interacts with HTML using commands such as document.write(), .innerHTML and .createElement()

    To interact with XHTML JavaScript can only use commands such as createElementNS() and none of the versions that work with HTML will work with XHTML.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  5. #5
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using XHTML allows you to put your nose a little higher in the air and scoff faintly when browsing the web.

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,875
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    The other thing to remember with XHTML is that Internet Explorer 8 (and earlier) doesn't support it and so you would need to serve your pages to those using that browser as HTML even if you are going to serve it as XHTML to everyone else (unless you just forget about IE users). Microsoft have also indicated that they have no plans to add support for XHTML to IE9.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  7. #7
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    In effect then Microsoft have killed off XHTML, because keeping compatibility with IE effectively means an inability to leverage the advantages of XHTML in a cross-platform way. This is why many developers decide to stay with HTML 4, XHTML and the IE woes just aren't worth the pain.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  8. #8
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Birnam wood is come to Dunsinane

  9. #9
    SitePoint Zealot Amenthes's Avatar
    Join Date
    Oct 2006
    Location
    Bucharest, Romania
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's not only Microsoft who's "killing" XHTML, it's also Mozilla, Opera and Safari who pay much more attention to the HTML 5 draft. And that may be because it is so much activity out there, as opposed to XHTML 2, which as far as I know is developed by a closed committee.

    I heard nothing new about XHTML 2, while news about HTML 5 and WHATWG appear constantly.

  10. #10
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, the XHTML5 draft is developed in parallel with HTML5, so I wouldn't necessarily agree with that description. (That both HTML5 and XHTML5 are semantic disasters with an utter contempt for accessibility is a different matter.)
    Birnam wood is come to Dunsinane

  11. #11
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,875
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    Well, the XHTML5 draft is developed in parallel with HTML5, so I wouldn't necessarily agree with that description. (That both HTML5 and XHTML5 are semantic disasters with an utter contempt for accessibility is a different matter.)

    I agree with all of what you said.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  12. #12
    SitePoint Addict
    Join Date
    Dec 2007
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    Well, the XHTML5 draft is developed in parallel with HTML5, so I wouldn't necessarily agree with that description. (That both HTML5 and XHTML5 are semantic disasters with an utter contempt for accessibility is a different matter.)
    o.O, we are already at XHTML 5???
    mmj

  13. #13
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,875
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by M-M-J View Post
    o.O, we are already at XHTML 5???
    XHTML 5 bears the same relationship to HTML 5 as XHTML 1.0 bears to HTML 4.01. It is an entirely separate development path for XHTML to the one with XHTML 1.1 and XHTML 2.0.

    The only thing that XHTML 5 and XHTML 2.0 have in common is that they are both proposed standards that are still in development. Neither of them is close to being supported by browsers although XHTML 5 is closer to being supported as it is much closer to the way that current HTML is written than either XHTML 1.1 or XHTML 2.0 is and so most of thhe commands it contains can be interpreted by browsers as if it were HTML 4.01. Those that can't fall into two groups - those that were deprecated in HTML 4.01 for good reason and should never have been put back into (X)HTML 5 and those new ideas (some good, some bad) which are the proposed additions to the existing language.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •