468,103 Members | 1,265 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

The proper DocType statement to use

I create my website using Front Page 2000. I notice that none of my pages
have a DocType statement at the top.

I have read that if you want IE6 to use "Standards mode" rather than the
"Quirks mode," which IE uses if there is no DocType, then you have to put
the proper DocType statement at the top of every page. What is the
recommended DocType statement I should use if I am aiming at IE6?

Thanks, CMA
Jul 20 '05 #1
8 4199
CJM
http://www.alistapart.com/stories/doctype/
CJM

"CMAR" <cm***@yahoo.com> wrote in message
news:Su*******************@twister.nyroc.rr.com...
I create my website using Front Page 2000. I notice that none of my pages
have a DocType statement at the top.

I have read that if you want IE6 to use "Standards mode" rather than the
"Quirks mode," which IE uses if there is no DocType, then you have to put
the proper DocType statement at the top of every page. What is the
recommended DocType statement I should use if I am aiming at IE6?

Thanks, CMA

Jul 20 '05 #2
"CMAR" cm***@yahoo.com wrote:
<snip> What is the
recommended DocType statement I should use if I am aiming at IE6?


Visit:
http://www.hut.fi/u/hsivonen/doctype.html

James Pickering
http://www.jp29.org/
Jul 20 '05 #3
Thanks to both CJM and Jamesicus for useful posts. The recommendation seems
to be to use the following:
HTML 4.01 Strict, Transitional, Frameset
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">

I can figure out that I use the third one for me frameset pages, but which
of the first two do I use for all my other pages? (Remember, I authored with
FP2000).

Thanks, CMA

"CJM" <cj*****@m.co.uk> wrote in message news:3f1fec34@shknews01...
http://www.alistapart.com/stories/doctype/
CJM

"CMAR" <cm***@yahoo.com> wrote in message
news:Su*******************@twister.nyroc.rr.com...
I create my website using Front Page 2000. I notice that none of my pages have a DocType statement at the top.

I have read that if you want IE6 to use "Standards mode" rather than the "Quirks mode," which IE uses if there is no DocType, then you have to put the proper DocType statement at the top of every page. What is the
recommended DocType statement I should use if I am aiming at IE6?

Thanks, CMA


Jul 20 '05 #4
CMAR wrote:
I can figure out that I use the third one for me frameset pages, but which
of the first two do I use for all my other pages? (Remember, I authored with
FP2000).


With Microsoft products it is always safer to use the loose DTD, since
their code might not be so 'strict'...

--
Jeroen Sangers \/
/\ Be Alert...
http://www.jeroensangers.com \/
http://www.fimcap.org /\ The world needs more Lerts!

Jul 20 '05 #5
CMAR wrote:
I create my website using Front Page 2000. I notice that none of my pages
have a DocType statement at the top.

I have read that if you want IE6 to use "Standards mode" rather than the
"Quirks mode," which IE uses if there is no DocType, then you have to put
the proper DocType statement at the top of every page. What is the
recommended DocType statement I should use if I am aiming at IE6?


The DOCTYPE specifies to which "version" of HTML your code is compliant.
As you are using FP, none of your pages is likely to comply to any
version of HTML specification.

So the second-best thing to do is not to specify a DOCTYPE, as to do so
would be to claim something about your code that is not true.

The best thing to do is to tidy up or re-write your code so that it
complies with, say, HTML-4.01 Strict, and *then* add the appropriate
DOCTYPE to it, to reflect the quality of code.

http://www.tranchant.freeserve.co.uk...alidation.html

--
Mark.
http://www.tranchant.freeserve.co.uk/

Jul 20 '05 #6
> I create my website using Front Page 2000. I notice that none of my
pages have a DocType statement at the top.

I have read that if you want IE6 to use "Standards mode" rather than
the "Quirks mode," which IE uses if there is no DocType, then you
have to put the proper DocType statement at the top of every page.
What is the recommended DocType statement I should use if I am aiming
at IE6?

Thanks, CMA


Clean up your code to a valid version of HTML, a list of valid DTDs is given
on the page referenced below
http://www.w3.org/QA/2002/04/valid-dtd-list.html

I would suggest HTML 4.01 Strict for new documents, HTML 4.01 Transitional
for legacy documents (unless you can get them to strict quite easily).

--
BenM
http://www.benmeadowcroft.com/
Jul 20 '05 #7
In article <50********************@twister.nyroc.rr.com>,
CMAR <cm***@yahoo.com> wrote:
A good suggestion: I should use this one then:

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


Yes, but FrontPage-generated markup is highly unlikely to actually be
consistent with that document type so you should check the result with
the W3C Markup Validator[0] (or an equivalent Validating service[1])
and manually fix the detected errors.

If the errors cannot be fixed -- e.g. because FP just immediately
messes it up again and you can't switch to a better authoring tool --
you should leave out the DOCTYPE Declaration alltogether. If all you're
after is generating legacy/tagsoup pages then a DOCTYPE declaration is
not necessary and should be omitted to give browsers a sporting chance
to distinguish it from well-written/standard pages.
BTW, the "Transitional" document type is intended for legacy documents.
Your ultimate goal should be the "Strict" document type, even if you
can't (easily) make it there quite yet. Switching to Strict and running
it through a Validator -- and correcting any errors that you can -- is
a good idea to get rid of as much of the legacy gunk as possible.

[0] - W3C Markup Validator: <http://validator.w3.org/>

[1] - Such as Nick Kew's excellent Site Valet
<http://valet.webthing.com/>
or the WDG's HTML Validator
<http://www.htmlhelp.com/tools/validator/>.

Be weary of "HTML Checkers" that do not specify what kind of
backend they use; you want one that uses an "SGML Parser" to
be sure you have Valid HTML before you use more superficial
services such as "checkers" or "lints".


PS. You may want to take look at
<http://www.netmeister.org/news/learn2quote2.html> at some point.

--
T.E.R.J.E. - Technician Engineered for Repair and Justified Exploration
B.L.E.S.S. - Biomechanical Lifeform Engineered for Scientific Sabotage
Jul 20 '05 #8
"CMAR" <cm***@yahoo.com> wrote in message
news:Su*******************@twister.nyroc.rr.com...
I create my website using Front Page 2000. I notice that none of my pages
have a DocType statement at the top.

I have read that if you want IE6 to use "Standards mode" rather than the
"Quirks mode," which IE uses if there is no DocType, then you have to put
the proper DocType statement at the top of every page. What is the
recommended DocType statement I should use if I am aiming at IE6?


See http://www.upsdell.com/BrowserNews/res_doctype.htm
Jul 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by David Ross | last post: by
9 posts views Thread by Richard Silverstein | last post: by
25 posts views Thread by Viken Karaguesian | last post: by
5 posts views Thread by Viken Karaguesian | last post: by
2 posts views Thread by PapaRandy | last post: by
drhowarddrfine
reply views Thread by drhowarddrfine | last post: by
6 posts views Thread by laredotornado | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.