specifying DOCTYPE with invalid html

Discussion in 'HTML' started by David Higgins, Oct 10, 2003.

  1. Does specifying a DOCTYPE break browsers, if the HTML within that page
    is not valid for that DTD?

    Why on earth would I want to do that anyway, you might ask. I have
    been writing simple XHTML1.1 valid pages (according to the w3c
    validator) with all layout and formatting in the CSS, as I have been
    learning is the way to do things now. The problem is, I master a site
    which up until now has been made in Frontpage2002. I can feel the
    majority of you shifing uneasily in your chairs right now. FP and
    valid XHTML?! What was I thinking! The issue is this: I want
    form-to-email funtionality, FP makes this very easy to do, and I don't
    know any cgi and am reluctant to get into that yet.

    So if I make a valid XHTML1.1 page, and then add the FP form code
    which produces errors in the validator, am I going to break browsers
    because page contains invalid code? Or will it be rendered anyway? How
    does this work?

    TIA
    Dave Higgins
    (the site is www.leedscmr.org)
     
    David Higgins, Oct 10, 2003
    #1
    1. Advertising

  2. David Higgins wrote:

    > ...
    > So if I make a valid XHTML1.1 page, and then add the FP form code
    > which produces errors in the validator, am I going to break browsers
    > because page contains invalid code? Or will it be rendered anyway? How
    > does this work?


    trial and error will be your only companions on that road.

    btw: you don't need cgi to create the form.

    --
    William Tasso - http://WilliamTasso.com
     
    William Tasso, Oct 10, 2003
    #2
    1. Advertising

  3. David Higgins

    brucie Guest

    In post <>
    David Higgins said...

    > So if I make a valid XHTML1.1 page, and then add the FP form code
    > which produces errors in the validator,


    why cant you fix the markup FP spews out?

    > am I going to break browsers because page contains invalid code? Or will it
    > be rendered anyway? How does this work?


    if the markup isn't valid instead of rendering the document as per the
    specs that it /knows how to render/[1] because the specifications are
    published and freely available the UA has to guess what the author
    meant.

    a) they may guess wrong.
    b) they may not bother guessing at all.
    c) they may not all guess the same way.
    d) they may change the way they guess.
    e) different versions may guess differently.
    f) some markup may change the way they guess.
    g) very few people would know how google guesses - or does it?

    so, do you want to tell the UA what you want/mean or let it guess for
    itself - maybe - if you're lucky?

    [1] baring bugs, support etc.

    --
    brucie.
    10/October/2003 07:54:55 pm
     
    brucie, Oct 10, 2003
    #3
  4. David Higgins

    rf Guest

    "brucie" <> wrote in message
    news:...
    > In post <>
    > David Higgins said...
    >
    > why cant you fix the markup FP spews out?


    Heaven forbid. Change something a WYSINWYG spits out? One might break
    something :)

    > if the markup isn't valid instead of rendering the document as per the
    > specs that it /knows how to render/[1] because the specifications are
    > published and freely available the UA has to guess what the author
    > meant.
    >
    > a) they may guess wrong.
    > b) they may not bother guessing at all.
    > c) they may not all guess the same way.
    > d) they may change the way they guess.
    > e) different versions may guess differently.
    > f) some markup may change the way they guess.
    > g) very few people would know how google guesses - or does it?
    >
    > so, do you want to tell the UA what you want/mean or let it guess for
    > itself - maybe - if you're lucky?


    Your're just guessing :)

    Cheers
    Richard.
     
    rf, Oct 10, 2003
    #4
  5. David Higgins wrote:
    > Does specifying a DOCTYPE break browsers, if the HTML within that page
    > is not valid for that DTD?


    LOL! As if browsers knew anything about valid HTML!


    > So if I make a valid XHTML1.1 page, and then add the FP form code
    > which produces errors in the validator, am I going to break browsers
    > because page contains invalid code? Or will it be rendered anyway? How
    > does this work?


    Add the FP form code, fix the errors, and use the fixed code as a
    template for new forms.


    Matthias
     
    Matthias Gutfeldt, Oct 10, 2003
    #5
  6. David Higgins

    brucie Guest

    In post <5Nvhb.144850$>
    rf said...

    > Your're just guessing :)


    i was hoping no one would notice :-(


    --
    brucie.
    10/October/2003 08:33:17 pm
     
    brucie, Oct 10, 2003
    #6
  7. Matthias Gutfeldt wrote:

    > David Higgins wrote:
    >> Does specifying a DOCTYPE break browsers, if the HTML within that page
    >> is not valid for that DTD?

    >
    > LOL! As if browsers knew anything about valid HTML!


    Maybe not, but they tend to know a thing or two about well-formed XML. If
    you're using XHTML and you make a mistake that violates well-formedness,
    then prepare for breakages.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?id=132
     
    Toby A Inkster, Oct 10, 2003
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. KS
    Replies:
    7
    Views:
    637
    Michael Winter
    Nov 10, 2004
  2. PapaRandy
    Replies:
    2
    Views:
    366
    Circa
    Jul 11, 2006
  3. Tatyana
    Replies:
    1
    Views:
    1,218
    Alan Silver
    Aug 8, 2006
  4. Rolf Welskes
    Replies:
    6
    Views:
    1,490
    Steven Cheng[MSFT]
    Aug 24, 2006
  5. Larry Lindstrom
    Replies:
    19
    Views:
    1,319
    Jonathan N. Little
    Jun 12, 2012
Loading...

Share This Page