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 10 of 10
  1. #1
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts

    doctypes -- which is the "standard"?

    On a recent project I've been using HTML 4.01 Transitional because of some older markup that I didn't have time to update. I have been using the closing tag syntax of <tag ... /> and that is giving a warning with this HTML doctype. If I change to XHMTL 1.0 Transitional to handle this syntax, other things break (I don't remember exactly what now, just that it was going to be painful to fix).

    So... what is the doctype of tomorrow? Will everything be XHTML? Is it stupid to use HTML 4.01 Transitional? What about HTML 4.01 Strict?

  • #2
    Banned
    Join Date
    Feb 2008
    Location
    Winnipeg, Canada
    Posts
    396
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Generally web developers are saying XHTML is the future, although there is a select few rallying behind HTML. We'll have to wait for XHTML 2/HTML 5/Web Applications 1 before we can all choose sides.

    I either use XHTML Strict or Transitional. I was using Strict exclusively, but was recently made aware that you can't use the TARGET attribute in A tags without going for Transitional. So nowadays I am using Transitional exclusively.

    However, as soon as the next wave comes out this all may change.

  • #3
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    I use Strict exclusively, typically XHTML Strict.
    I've yet to find a convincing reason to use those attributes which require me to use Transitional. (I never use framesets/iframes and am convinced that new windows are better provided by scripting, on the few occasions that they may benefit a site and/or its users.)

    Strict provides the very best chance of x-browser consistency in terms of standards-compliant rendering, so even on the rare occasions when I might be tempted to use an iframe (only ever c/o thickbox et al) or a hard-coded target attribute (PDFs, maybe), it's not beyond the realms of possibility that I might use a Strict DTD with a few, non-critical invalidations in the markup or c/o the scripting, than to drop down to a Transitional doctype. The use of a Transitional doctype is likely to have a greater impact on x-browser rendering than a nominal use of invalid markup such as an iframe or target attribute.

    I appreciate that some may consider this position a touch blasphemous, but I still consider myself a web standards advocate.

    I don't expect my practises to change significantly in the near future, but like Andrew, it seems, I'll be keeping an eye on the progress made in discussions about XHTML 2 and HTML 5.
    Last edited by Bill Posters; 02-19-2008 at 07:29 PM.

  • #4
    Banned
    Join Date
    Feb 2008
    Location
    Winnipeg, Canada
    Posts
    396
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I am convinced that new windows are better provided by scripting
    How do you come to that conclusion?

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Quote Originally Posted by Andrew Johnson View Post
    How do you come to that conclusion?
    Just read this
    http://www.codingforums.com/showthread.php?t=117463
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #6
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeň, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Let's see if I can explain it:

    HTML4.01 is:
    - A vocabulary of element names, attribute names, entitiy names, allowed attribute values, attribute content models, and element content models.
    - A set of semantics that apply to that vocabulary.
    - A set of three different SGML DTDs to use for confirming that a document conforms to the HTML4.01 vocabulary.

    XHTML1.0 is:
    - A set of three different XML DTDs to use for confirming that a document conforms to the vocabulary of HTML4.01.
    - An XML namespace to associate the semantics of HTML4.01 with the vocabulary of HTML4.01 in an XML serialisation.


    In both cases, the question of syntax is offloaded to another spec, SGML and XML respectively.

    Now, there's another factor: Content-Type. As you see, XHTML contains a way to explain which semantics a document has (the XHTML namespace). HTML does not have such a marker. Instead, all documents that are served using Content-Type "text/html" are considered to be HTML, and use the HTML semantics. For XHTML, documents served using any XML Content-Type, such as "application/xhtml+xml" or "application/xml" will use the XML namespace to know which semantics to apply to a document.





    If you haven't realised it already: HTML4.01 and XHTML1.0 are the same semantics, and the same vocabulary. They just have two different syntaces: SGML for the former, XML for the latter. They are the same language!

    Just choose which syntax you're going to use: HTML/SGML (since none of the browsers treat it like SGML, could as well call it the HTML format instead, as for HTML5) or XML.
    Last edited by liorean; 02-19-2008 at 08:19 PM.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #7
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    Quote Originally Posted by _Aerospace_Eng_ View Post
    Jeez, was that really less than a year ago?
    Seems like much, much longer ago.

  • #8
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    I either use XHTML 1 Strict or 1.1, or nothing and use
    Code:
    <!doctype html>
    to trigger standards mode when I'm offline and validation is an unnecessary thing (like quickly throwing together files for this lot =P)

  • #9
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    Quote Originally Posted by CyanLight View Post
    I either use XHTML 1 Strict or 1.1
    Interesting. I've yet to find a good reason to use 1.1.
    I used to play around with it a couple of years back, but decided that it offered no substantial benefits over serving XHTML 1.0 Strict as a/x+x.
    (I presume that you're aware that the spec does not allow for 1.1 to be served as text/html, which is permitted Ó la App. C. which I sometimes use c/o content negotiation when conditions permit.)

    For which sites / situations do you use 1.1?

  • #10
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    For which sites / situations do you use 1.1?
    I rarely do--if so, it's for my personal sites and, even then, I check out whether application/xhtml+xml is supported (or whether it's IE7) before setting the DTD as such, with an XML prologue. Else it falls back to XHTML 1 served as html.


  •  

    Posting Permissions

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