468,133 Members | 1,102 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,133 developers. It's quick & easy.

Need DOCTYPE help

When I validate the source of http://www.24stores.com I'm told
that I have an incorrect DOCTYPE statement.

How can I, or can someone determine what I'm doing wrong !!

I have no idea which doctype setting to specify.

Might this also be the reason that the page shows differently in IE vs
Mozilla ??

Thanks in advance.

John

Jan 30 '06 #1
6 1486
"jperillo" <Jo**@Perillo.Com> wrote:
When I validate the source of http://www.24stores.com I'm told
that I have an incorrect DOCTYPE statement.
As you do. Consult the HTML specifications for the exact form of a DOCTYPE
declaration.
How can I, or can someone determine what I'm doing wrong !!
Well, pretty much everything. The page is a horrendously messed-up tag
sallad. Surely the fastest way to fix it is to start from scratch. Try
reading a good introduction to HTML.

Using a validator to check the mess would be comparable to feeding some text
in pig Latin into a spelling checker for English.
Might this also be the reason that the page shows differently in IE vs
Mozilla ??


Surely it may contribute to that.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jan 30 '06 #2
jperillo wrote :
When I validate the source of http://www.24stores.com I'm told
that I have an incorrect DOCTYPE statement.

How can I, or can someone determine what I'm doing wrong !!

I have no idea which doctype setting to specify.

Might this also be the reason that the page shows differently in IE vs
Mozilla ??

Mozilla (Seamonkey, Firefox, Galeon, K-meleon, etc) and IE6 will render
pages more closely to web standards if you use a doctype declaration
which triggers standards compliant rendering mode in IE6. HTML 4.01
strict triggers standards compliant rendering mode in IE6 and in all
other modern browsers.
Thanks in advance.

John

For many reasons I won't explain here, I recommend you use HTML 4.01
strict. Like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

More reading:

Recommended DTDs to use in your Web document:
http://www.w3.org/QA/2002/04/valid-dtd-list.html
How to achieve Web standards and quality in your site:
http://www.w3.org/QA/2002/04/Web-Quality
Activating the Right Layout Mode Using the Doctype Declaration (a bit
outdated)
http://hsivonen.iki.fi/doctype/
Nvu User Guide recommends using HTML 4.01 strict:
http://nvudev.com/guide/1.0PR/ugs03.htm#s321
Gérard
--
remove blah to email me
Jan 30 '06 #3
"Gérard Talbot" <ne***********@gtalbot.org> wrote in message
news:44***********@uni-berlin.de...
jperillo wrote :
When I validate the source of http://www.24stores.com I'm told
that I have an incorrect DOCTYPE statement.
For many reasons I won't explain here, I recommend you use HTML 4.01
strict. Like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


There's one thing which has been niggling me for a while - if every web page
used the above doctype then wouldn't that swamp www.w3.org with requests for
the strict.dtd file? What actually happens when a browser encounters the
doctype declaration?
Jan 31 '06 #4
Danny@Kendal wrote:
"Gérard Talbot" <ne***********@gtalbot.org> wrote:
For many reasons I won't explain here, I recommend you use HTML 4.01
strict. Like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
There's one thing which has been niggling me for a while - if every web
page used the above doctype then wouldn't that swamp www.w3.org with
requests for the strict.dtd file?


Only if every page was parsed by a parser that actually referenced
DTDs.
What actually happens when a browser
encounters the doctype declaration?


Either nothing at all (in older browsers) or the doctype is compared
against an internal list of values and the rendering mode is set to
Quirks or Standards (in many modern browsers). That's all.

Steve

Jan 31 '06 #5
On Tue, 31 Jan 2006 10:22:29 -0000, "Danny@Kendal"
<da***@removethisbit.ghpkendal.co.uk> wrote:
There's one thing which has been niggling me for a while - if every web page
used the above doctype then wouldn't that swamp www.w3.org with requests for
the strict.dtd file?
Obviously not 8-)
What actually happens when a browser encounters the
doctype declaration?


Three things can happen:

* The browser recognises it and already has the DTD hard-coded into its
executable. There aren't many of these, and they hardly change very
often. The "DTD" here might be very crudely or partially represented -
there's little real need for it in a web parser, they have to make the
best of what they can get.

* The browser ignores it all anyway. The page renderer is coded in
visual basic and old string and it's sticks whatever it likes, wherever
it likes.

* It's a traditional SGML parser (unlikely to be found on the web). It
grabs one copy of that DTD, then caches it.
Feb 1 '06 #6
"Andy Dingley" <di*****@codesmiths.com> wrote in message
news:p5********************************@4ax.com...
On Tue, 31 Jan 2006 10:22:29 -0000, "Danny@Kendal"
<da***@removethisbit.ghpkendal.co.uk> wrote:
There's one thing which has been niggling me for a while - if every web
page
used the above doctype then wouldn't that swamp www.w3.org with requests
for
the strict.dtd file?


Obviously not 8-)
What actually happens when a browser encounters the
doctype declaration?


Three things can happen:

* The browser recognises it and already has the DTD hard-coded into its
executable. There aren't many of these, and they hardly change very
often. The "DTD" here might be very crudely or partially represented -
there's little real need for it in a web parser, they have to make the
best of what they can get.


Ah, I can sleep soundly once more.
Feb 1 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Bud Curtis | last post: by
3 posts views Thread by bill turner | last post: by
18 posts views Thread by Raymond Alexander | last post: by
12 posts views Thread by Robert Misiorowski | last post: by
7 posts views Thread by mike | last post: by
2 posts views Thread by PapaRandy | last post: by
vs2k8
5 posts views Thread by vs2k8 | last post: by
27 posts views Thread by didacticone | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.