Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Location
    Bristol, UK
    Posts
    932
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question xhtml1-strict.dtd vs xhtml1-transitional.dtd

    OK just a quickie...

    My site is valid XHTML and does everything (well almost everything) in CSS (which is also valid).

    Is there any advantage in using a strict doctype as opposed to the standard transitional doctype? I changed it to strict just now, as it still displays exactly the same in both Mozilla and IE6.

    Is there anything I should be aware of with using a strict doctype? And which is 'better' to use...

    ::] krycek [::
    ithium | SOAPI | SDP | PTPScript manual
    "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."

  • #2
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    which is better?
    i guess you couldnt really get an unbiased answer to that question.
    my opinion is strict xhtml
    http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd

    i havnt had any problems with it that i couldnt solve within an hour at the most.

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    A potential problem with strict xhtml is that IE6 renders it in quirks mode

  • #4
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Originally posted by brothercake
    A potential problem with strict xhtml is that IE6 renders it in quirks mode
    It renders my XHTML 1.1 doctype in strict mode. It goes into quirks if it sees the <?xml?> processing instruction (which is utterly stupid of it).

  • #5
    Regular Coder
    Join Date
    Nov 2002
    Location
    Bristol, UK
    Posts
    932
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by brothercake
    A potential problem with strict xhtml is that IE6 renders it in quirks mode
    I definitely agree with jkd on this one

    ::] krycek [::
    ithium | SOAPI | SDP | PTPScript manual
    "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh I see - so you're saying this with XHTML strict, the first thing on the page should be an <?xml tag, but if it is then IE6 goes into quirks mode?

  • #7
    Regular Coder
    Join Date
    Nov 2002
    Location
    Bristol, UK
    Posts
    932
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yes... sort of.

    As far as I understand, the xml tag isn't even necessary. I am not sure why it should be there... my code is still valid XHTML without it, and IE mucks up with it. So, leave it out

    ::] krycek [::
    ithium | SOAPI | SDP | PTPScript manual
    "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    XHTML is XML, so really it should start with an <?xml declaration, to be 100% valid. Not necessary in practise, but correct in theory.

    There are big advantages though - in mozilla if you treat XHTML as XML - and configure your server to associate .xhtml with application/xml+xhtml you get a much better result - no pointless attempts to display erroneous coding - you get an XML parsing error if you make a mistake


    But unfortunately ... IE doesn't understand this ... .xhtml as anything other than text/html makes it prompt for a download

    jkd started a thread about this .... don't think a full solution was found for Apache, but a friend told me that IIS can use Response.Header to write browser-conditionalised mime types.
    Last edited by brothercake; 12-15-2002 at 06:12 PM.

  • #9
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Originally posted by brothercake
    XHTML is XML, so really it should start with an <?xml declaration, to be 100% valid. Not necessary in practise, but correct in theory.
    The <?xml?> processing instruction is actually optional. An XML viewer should be able to "guess" at the encoding by the first few characters and such.


  •  

    Posting Permissions

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