www.webdeveloper.com
Page 1 of 3 123 LastLast
Results 1 to 15 of 36

Thread: HTML or XHTML?

  1. #1
    Join Date
    Nov 2004
    Posts
    23

    HTML or XHTML?

    I've been creating XHTML 1.0 Strict web pages that pass validation, thinking this is best. But I found two sources that say otherwise:
    www.hsivonen.iki.fi
    www.hixie.ch

    Should I not make XHTML and create HTML 4.01 Strict instead?

    Regards,
    Neal

  2. #2
    Join Date
    Jun 2004
    Location
    48°46′36″ N 9°10′48″ E
    Posts
    3,747
    most people here will tell you yes, because xhtml should be set as xml and it is not supported by all browsers, so adding an xhtml doctype declaration and and set is content type as text is incorrect i believe.
    Last edited by LiLcRaZyFuZzY; 10-18-2005 at 12:22 PM.

  3. #3
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    It really depends upon what you are doing. XHTML has some nice features but it is not compatable with HTML. If you are not using those features and your page is for the public then by all means, publish in HTML 4.01 Strict.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  4. #4
    Join Date
    Nov 2004
    Posts
    23
    Thank you both! I can't believe how fast I go an answer. The XHTML pages I've created in the past are static web pages with CSS and Javascript. I worked hard learning how to create XHTML, selling this skill to clients, and now I learn it's best not to use it. Rats!

    Thank you both, again.

    Regards,
    Neal

  5. #5
    Join Date
    Jul 2005
    Location
    USA
    Posts
    3,910
    There are only a few differences between XHTML 1.0 Strict and HTML 4.01 Strict. Besides, support for XHTML will probably be better in the future.
    Learn CSS. | SSI | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions

    Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

    Check out my blog.

  6. #6
    Join Date
    Nov 2004
    Posts
    23
    From what I've found on the web, XHTML is today's snake oil. There's no need to use it. I feel betrayed by the teachers who taught me XHTML. I feel betrayed by the CSS books that suggest using XHTML. It's a hoax. There are no browsers that parse XML, and if they did, they'd parse HTML, too. Unless I'm adding SVG graphics, which no browser renders yet, I don't need XHTML. Flash will do fine.

    Many thanks to Kravvitz for your help.

  7. #7
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    W3C (who set the standards) say that the next version of HTML currently under development is XHTML 2.0.

    Basically the difference between HTML and XHTML (when served as HTML) is the closingm slashes in singleton tags such as images and breaks.
    Stephen

  8. #8
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Quote Originally Posted by felgall
    W3C (who set the standards) say that the next version of HTML currently under development is XHTML 2.0.

    Basically the difference between HTML and XHTML (when served as HTML) is the closingm slashes in singleton tags such as images and breaks.
    1) The W3C, being a non-governmental agency, sets no standards. That's why all the public identifiers in their DOCTYPEs begin with a "-" and not a "+".

    2) I do wish you would bother to read the XHTML 1.0 and XML 1.0 specifications. There is a world of difference between XHTML and HTML and the two are not compatable.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  9. #9
    Join Date
    Jun 2004
    Location
    48°46′36″ N 9°10′48″ E
    Posts
    3,747
    nevertheless, would xhtml be supported by all browsers, then it would be the standard markup language.
    Last edited by LiLcRaZyFuZzY; 10-18-2005 at 03:14 PM.

  10. #10
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Quote Originally Posted by krousen56
    From what I've found on the web, XHTML is today's snake oil. There's no need to use it. I feel betrayed by the teachers who taught me XHTML. I feel betrayed by the CSS books that suggest using XHTML. It's a hoax. There are no browsers that parse XML, and if they did, they'd parse HTML, too. Unless I'm adding SVG graphics, which no browser renders yet, I don't need XHTML. Flash will do fine.

    Many thanks to Kravvitz for your help.
    MSIE handles XHTML perfectly well; you just have to use a ".xml" extension.

    HTML and XHTML are two different tools for two different purposes. You don't get rid of your screwdriver because it doesn't drive nails very well. For public documents on the web HTML 4.01 strict is, and will remain, the perfect and proper tool. But for certain applications XHTML is just the right thing.

    Flash, on the other hand, is troublesome.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  11. #11
    Join Date
    Jul 2005
    Location
    USA
    Posts
    3,910
    Quote Originally Posted by krousen56
    From what I've found on the web, XHTML is today's snake oil. There's no need to use it. I feel betrayed by the teachers who taught me XHTML. I feel betrayed by the CSS books that suggest using XHTML. It's a hoax. There are no browsers that parse XML, and if they did, they'd parse HTML, too. Unless I'm adding SVG graphics, which no browser renders yet, I don't need XHTML. Flash will do fine.
    It's not a hoax. People are just jumping on the bandwagon without properly researching the issues involved.

    Mozilla browsers, including Firefox, and Opera can parse XML. (Konqueror and Safari probably can too.) HTML 4 is not compatible with XML, so no, XML parsers can't parse HTML. That's part of why they developed XHTML.

    Firefox 1.5 will support SVG

    Flash? Ugh. Why?


    Quote Originally Posted by Charles
    MSIE handles XHTML perfectly well; you just have to use a ".xml" extension.
    IE doesn't support the application/xhtml+xml mime-type though.

    Quote Originally Posted by Charles
    HTML and XHTML are two different tools for two different purposes. You don't get rid of your screwdriver because it doesn't drive nails very well. For public documents on the web HTML 4.01 strict is, and will remain, the perfect and proper tool. But for certain applications XHTML is just the right thing.

    Flash, on the other hand, is troublesome.
    Indeed.
    Last edited by Kravvitz; 10-18-2005 at 03:18 PM.
    Learn CSS. | SSI | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions

    Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

    Check out my blog.

  12. #12
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,178
    XHTML sounds sexier that HTML. Maybe instead of calling it HTML4, they should have called it HTML++, which would sound more new-and-improved.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  13. #13
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Quote Originally Posted by Kravvitz
    IE doesn't support the application/xhtml+xml mime-type though..
    IE doesn't recognize any MIME types. It does everything by file extension.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  14. #14
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Quote Originally Posted by NogDog
    XHTML sounds sexier that HTML. Maybe instead of calling it HTML4, they should have called it HTML++, which would sound more new-and-improved.
    Actually, your close to the real truth about XHTML. Take a close look at the specification. It's not XHTML 1.0, it's XHTML™ 1.0.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  15. #15
    Join Date
    Nov 2004
    Posts
    23
    I thank everyone for the interest. So what is the advantage of using XHTML 1.0? Should I change the extensions of my web pages to ".xml"?

    I'll read the W3C documents on XHTML.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles