472,805 Members | 1,015 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 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 4367
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;
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.