473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

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 4395
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: David Ross | last post by:
I manually code my HTML without using any page generating software. I need to know how to specify the DOCTYPE at the beginning of my HTML files. No, I don't want a "canned" DOCTYPE statement. ...
9
by: Richard Silverstein | last post by:
I was hoping someone more expert in css could help me w. a problem I'm having w. a stylesheet I've created for a Pbase photo site. My site is at http://www.pbase.com/richards1052. Currently, it...
25
by: Viken Karaguesian | last post by:
Hello all, I'm somewhat of a newbie to webscripting. I've made a couple of websites in the past with WYSIWYG software, but now I'm much more interested in manual scripting. I have some...
5
by: Viken Karaguesian | last post by:
Hello everyone, I have a question about the XHTML doctype. I often times see this statement included in the <html> tag: <html xmlns="http://www.w3.org/1999/xhtml"> If I use the full...
2
by: PapaRandy | last post by:
Hello, I am trying to validate the following .py webpage as HTML (through W3C). I put: ----------------------------------------------------------------------------- print "Content-type:...
15
by: Lennart | last post by:
Hi folks, I have created an animated image gallery in dhtml. It works fine in Internet Explorer. In Firefox, it only works if I ommit the DOCTYPE tag. The page is valid xhtml-strict but with a...
17
by: Zytan | last post by:
I can scroll a WebBrowser to the bottom like so: if (webControl.Document != null) webControl.Document.Body.ScrollTop = int.MaxValue; But, if I include a proper DOCTYPE (for XHTML 1.1 DTD) like...
0
drhowarddrfine
by: drhowarddrfine | last post by:
The Doctype or DTD Many coders get confused by all the talk of doctypes and how they affect browsers and the display of their web pages. This article will get right to the point about doctypes...
6
by: laredotornado | last post by:
Hi, I have this table cell <td class="contextMenu"</td> and then this definition in my stylesheet ..contextMenu { width: 16px;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.