What happens if no DOCT YPE?

M

Michael Laplante

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
 
J

Jukka K. Korpela

Michael Laplante said:
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.
 
D

dorayme

Jukka K. Korpela said:
(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.
 
F

Frank Olieu

[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)...
 
N

Neredbojias

To further the education of mankind, dorayme
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.
 
A

Alan J. Flavell

[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!
 
F

Frank Olieu

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


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!
 
J

Jukka K. Korpela

dorayme said:
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.
 
D

dorayme

Jukka K. Korpela said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top