What happens if no DOCT YPE?

Discussion in 'HTML' started by Michael Laplante, Jun 11, 2006.

  1. In the absence of a doctype declaration, what do browser do? Is there a
    default based on strict compliance? Fall back to some sort of transitional
    setting? i.e. the page is:

    <html>
    stuff
    </html>

    M
     
    Michael Laplante, Jun 11, 2006
    #1
    1. Advertising

  2. Michael Laplante <> scripsit:

    > In the absence of a doctype declaration, what do browser do?


    Popular browsers go to "quirks" mode, i.e. intentionally misbehave.

    > Is there a default based on strict compliance?


    I understand all the words, and I can parse the question grammatically, but
    it still makes no sense to me. Please rephrase.

    > Fall back to some sort of transitional setting?


    There is no "transitional setting".

    Contrary to what you seem to believe, and what some authorities might seem
    to be telling you, browsers do not actually change their behaviour according
    to the document type declaration. For example, if you declare a Strict
    doctype, they don't start ignoring elements and attributes that do not
    belong to the Strict version.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Jun 11, 2006
    #2
    1. Advertising

  3. Michael Laplante

    dorayme Guest

    In article <FQ0jg.1524$>,
    "Jukka K. Korpela" <> wrote:

    > Michael Laplante <> scripsit:
    >
    > > In the absence of a doctype declaration, what do browser do?

    >

    (1)
    > Popular browsers go to "quirks" mode, i.e. intentionally misbehave.



    and

    (2)
    > Contrary to what you seem to believe, and what some authorities might seem
    > to be telling you, browsers do not actually change their behaviour according
    > to the document type declaration. For example, if you declare a Strict
    > doctype, they don't start ignoring elements and attributes that do not
    > belong to the Strict version.


    What you might mean is that they do change their behaviour but
    not in every respect.

    --
    dorayme
     
    dorayme, Jun 12, 2006
    #3
  4. Michael Laplante

    Frank Olieu Guest

    "Jukka K. Korpela" <> wrote in
    news:FQ0jg.1524$:

    > [snip] browsers do not actually change their
    > behaviour according to the document type declaration.


    Don't you mean: browsers *do* actually change their behaviour according to
    the document type /declaration/, but *not* according to the Document Type
    /Definition/ that the /declaration/ refers to?
    The document type /declaration/ does trigger a change in behaviour (going
    for quirks or standard mode)...

    --
    Venlig hilsen | Kind regards | Cordialement
    Frank
     
    Frank Olieu, Jun 12, 2006
    #4
  5. Michael Laplante

    Neredbojias Guest

    To further the education of mankind, dorayme
    <> vouchsafed:

    > In article <FQ0jg.1524$>,
    > "Jukka K. Korpela" <> wrote:
    >
    >> Michael Laplante <> scripsit:
    >>
    >> > In the absence of a doctype declaration, what do browser do?

    >>

    > (1)
    >> Popular browsers go to "quirks" mode, i.e. intentionally misbehave.

    >
    >
    > and
    >
    > (2)
    >> Contrary to what you seem to believe, and what some authorities might
    >> seem to be telling you, browsers do not actually change their
    >> behaviour according to the document type declaration. For example, if
    >> you declare a Strict doctype, they don't start ignoring elements and
    >> attributes that do not belong to the Strict version.

    >
    > What you might mean is that they do change their behaviour but
    > not in every respect.


    The url within the dtd prevents quirks mode behavior in ie6 but that's all
    I've ever seen happen.

    --
    Neredbojias
    Infinity has its limits.
     
    Neredbojias, Jun 12, 2006
    #5
  6. Neredbojias <http://www.neredbojias.com/fliam.php?cat=alt.html> wrote:

    > The url within the dtd prevents quirks mode behavior in ie6 but that's all
    > I've ever seen happen.


    The rules for Quirks mode / Standards mode are far more complex then the
    presence or otherwise of a URL.

    http://gutfeldt.ch/matthias/articles/doctypeswitch/table.html

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Jun 12, 2006
    #6
  7. On Mon, 12 Jun 2006, Frank Olieu wrote:

    > "Jukka K. Korpela" <> wrote in
    > news:FQ0jg.1524$:
    >
    > > [snip] browsers do not actually change their
    > > behaviour according to the document type declaration.

    >
    > Don't you mean: browsers *do* actually change their behaviour according to
    > the document type /declaration/, but *not* according to the Document Type
    > /Definition/ that the /declaration/ refers to?


    It makes no difference to their parsing of HTML. I think that's the
    point that Jukka was referring to.

    > The document type /declaration/ does trigger a change in behaviour
    > (going for quirks or standard mode)...


    But that's a change in behaviour with reference to their
    interpretation of CSS - whereas the DTD. in theory, is only about the
    syntax of HTML. So that's a difference in at least two dimensions!
     
    Alan J. Flavell, Jun 12, 2006
    #7
  8. Michael Laplante

    Frank Olieu Guest

    "Alan J. Flavell" <> wrote in
    news:p:

    > It makes no difference to their parsing of HTML. I think that's the
    > point that Jukka was referring to.
    >
    >> The document type /declaration/ does trigger a change in behaviour
    >> (going for quirks or standard mode)...

    >
    > But that's a change in behaviour with reference to their
    > interpretation of CSS - whereas the DTD. in theory, is only about the
    > syntax of HTML. So that's a difference in at least two dimensions!


    Roger that!

    --
    Venlig hilsen | Kind regards | Cordialement
    Frank
     
    Frank Olieu, Jun 12, 2006
    #8
  9. dorayme <> scripsit:

    > What you might mean is that they do change their behaviour but
    > not in every respect.


    No, I meant what I wrote; I usually do. I was a bit vague though; I often
    am. In the absence of a doctype declaration, popular browsers go to
    "quirks" mode. Browsers do not actually change their behaviour according to
    the document type declaration (and here I forgot to add:) in any sense that
    has the slightest connection to what the declaration _means_ in SGML or XML
    terms.

    Perhaps I should have clarified that they play a (silly) game with the
    doctype declaration but won't even read the document type definition that it
    refers to.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Jun 12, 2006
    #9
  10. Michael Laplante

    dorayme Guest

    In article <i6ljg.2104$>,
    "Jukka K. Korpela" <> wrote:

    > dorayme <> scripsit:
    >
    > > What you might mean is that they do change their behaviour but
    > > not in every respect.

    >
    > No, I meant what I wrote; I usually do. I was a bit vague though; I often
    > am. In the absence of a doctype declaration, popular browsers go to
    > "quirks" mode. Browsers do not actually change their behaviour according to
    > the document type declaration (and here I forgot to add:) in any sense that
    > has the slightest connection to what the declaration _means_ in SGML or XML
    > terms.
    >
    > Perhaps I should have clarified that they play a (silly) game with the
    > doctype declaration but won't even read the document type definition that it
    > refers to.


    The very presence of something does things, but not because of
    its internal capacitiies. A large man comes into a class of small
    unruly students. He is a very knowledgeable man and the students
    could learn a lot from him. But all this passes right over their
    head. He is big and they behave themselves, at least they shut up.

    --
    dorayme
     
    dorayme, Jun 12, 2006
    #10
  11. Michael Laplante

    Neredbojias Guest

    To further the education of mankind, David Dorward <>
    vouchsafed:

    > Neredbojias <http://www.neredbojias.com/fliam.php?cat=alt.html> wrote:
    >
    >> The url within the dtd prevents quirks mode behavior in ie6 but
    >> that's all I've ever seen happen.

    >
    > The rules for Quirks mode / Standards mode are far more complex then
    > the presence or otherwise of a URL.
    >
    > http://gutfeldt.ch/matthias/articles/doctypeswitch/table.html


    Hmm, interesting variations. I doubt I could memorize the list, but there
    is always the link.

    --
    Neredbojias
    Infinity has its limits.
     
    Neredbojias, Jun 13, 2006
    #11
    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. cg
    Replies:
    0
    Views:
    476
  2. Andreas Klemt
    Replies:
    0
    Views:
    478
    Andreas Klemt
    Jul 4, 2003
  3. Peter Rilling
    Replies:
    4
    Views:
    411
    Peter Rilling
    Aug 4, 2003
  4. Nicolas Lehuen

    Patch : doct.merge

    Nicolas Lehuen, Dec 27, 2005, in forum: Python
    Replies:
    1
    Views:
    293
    Nicolas Lehuen
    Dec 28, 2005
  5. NM
    Replies:
    6
    Views:
    480
    Default User
    Sep 20, 2006
Loading...

Share This Page