Thread: IE support for xhtml

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    266

    IE support for xhtml

    My recent project was actually one my mom has assigned to me. She just started some sort of buisness and asked me to make her a website(since I'm the only one in the house that doesn't think a computer is run by a midget). Anyways, I was seeing whether I should use xhtml or html. On an article I read on the web it stated Internet Explorer doesn't support xhtml. Is this true?

  2. #2
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    IE supports XHTML partially. It doesn't support the specific mime type (application/xhtml+xml), but you can make an XHTML site without the correct mime type too. This is how a traditional XHTML 1.1 page could start like:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
        <head>
            <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
            <title>Your title here</title>
            <script src="yourscript.js" type="text/javascript"></script>
            <style type="text/css" media="all">
                @import "yourstyle.css";
            </style>
        </head>
    XHTML 1.0 is more popular (due to having a "Transitional" version), but 1.1 is my personal preference.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    266
    Would you suggest it for a modern website?

  4. #4
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Sure. XHTML has gained a lot of popularity in the recent years. XHTML actually makes a lot more sense than HTML since all tags have a start and an end (sometimes using the " />" tag end). It is also oriented to use CSS for more things than HTML does (the principle is that tags have no hardcoded features - only default CSS properties which can be changed). This is also good for the readability of the code.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  5. #5
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You should note that many XHTML supporters / users scoff at using the typical HTML signature for XHTML, because it isn't right. But it is also the only way to get IE to support it.
    Be sure to test the site rigidly to see if it works well in IE or make a choice - support IE or not.
    I wish you the best of luck in that.
    Darn Microsoft... *grumble*
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    there's always idiots who don't understand that the syntax IE supports IS correct XML (apart possibly from the missing <?xml declaration, can't remember if IE balks over that, or maybe only older versions did).

    They're probably the same zealots who think IE isn't standards compliant because it supports things that aren't part of the standard while also supporting the standard (or more frequently they don't seem to know the standard, just assuming IE doesn't support it because it doesn't support something FF supports that on closer investigation happens to not be part of the standard).

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Sorry, that is incorrect.
    IE simply parses XHTML as HTML and ignores the typical / or non-existent HTML tags.
    XHTML should be parsed different than HTML, with a different engine, so to speak. Therefore, it should be served as XHTML, not HTML.
    XHTML 1.0 has backwards compatibility that enabled it to be served as HTML, not newer versions do not. They should not be served as HTML.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Quote Originally Posted by jwenting View Post
    there's always idiots who don't understand that the syntax IE supports IS correct XML (apart possibly from the missing <?xml declaration, can't remember if IE balks over that, or maybe only older versions did).

    They're probably the same zealots who think IE isn't standards compliant because it supports things that aren't part of the standard while also supporting the standard (or more frequently they don't seem to know the standard, just assuming IE doesn't support it because it doesn't support something FF supports that on closer investigation happens to not be part of the standard).
    I'm not going to list all problems with it, I'll just give you one link that should pop up a normal webpage saying "Hello world" instead of offering a download.
    XHTML test
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  9. #9
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Just valid, strict HTML 4.01. It has no drawbacks compared to XHTML and has the advantage of really being supported by IE.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  10. #10
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I would rather go XHTML. It seems to wipe out all those inconsistencies and stuff from HTML and it much more strict.
    But regardless of HTML or XHTML, be sure not to use too new features or stuff, since they will leave IE in the dust, seeing as it has such poor standards support...
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  11. #11
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    It seems to wipe out all those inconsistencies and stuff from HTML
    There are no inconsistencies in HTML 4.01 that aren't also in XHTML 1.0. There are a few rules that can cause confusion if exploited, but they're still consistent.
    That said, you don't have to use any of those rules. In particular, you don't need to omit ending tags of non-nesting tags just because you're allowed to.

    and it much more strict.
    Also not true. Typical XHTML processors are more strict than typical HTML processors, but to even get there you need to send the file as application/xhtml+xml, which you can't do because of IE.
    Nothing prevents you from writing an HTML processor that bails out on the first error.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  12. #12
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Well, I digress. I simply like it being strict, no margin for optional omitting tags, etc.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  13. #13
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    Thanks Elysia. You're a programming master! How the hell do you know every thing?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Errors including <windows.h>
    By jw232 in forum Windows Programming
    Replies: 4
    Last Post: 07-29-2008, 01:29 PM
  2. unicode support
    By herWter in forum Windows Programming
    Replies: 5
    Last Post: 07-09-2008, 12:27 PM
  3. failure to import external C libraries in C++ project
    By nocturna_gr in forum C++ Programming
    Replies: 3
    Last Post: 12-02-2007, 03:49 PM
  4. Dev-cpp - compiler options
    By tretton in forum C Programming
    Replies: 7
    Last Post: 01-06-2006, 06:20 PM