DOCTYPEs

  • Thread starter Thread starter Craig Schiller
  • Start date Start date
C

Craig Schiller

Hello, all -

Browsing Kathleen Anderson's website, I followed a link regarding
DOCTYPES to a relevant article on the A LIst Apart website (the article
is at http://www.alistapart.com/stories/doctype/).

What I glean from the article is that a proper DOCTYPE statement must be
at the beginning of each web page to ensure proper rendering by modern
browsers. However, when I look at the HTML FP2002 is generating for the
web pages I'm currently designing, there is no DOCTYPE statement.

Eek.

Further, A List Apart provides the proper syntax for 7 different DOCTYPE
statements. So, my relative newbie questions are:

1. If a DOCTYPE statement is so critical to proper rendering, how come
FP2002 doesn't automate, or at least facilitate, the inclusion of one?

2. How do I determine which of the 7 suggested DOCTYPE statements I
should include in my pages?

Thanks very much in advance for your tips and insights here.

Craig Schiller
 
Or, remove the Doc Types and suffer no consequences.
--
-----
Tom Pepper Willett
Microsoft MVP - FrontPage
----
| To pick the right DOCTYPE:
| HTML:
| http://www.juicystudio.com/tutorial/html/conformance.html
|
| XHTML:
| http://www.juicystudio.com/tutorial/xhtml/conformance.html
|
| Found these on Google and didn't have enough time to evaluate fully, but
| they look good.
|
| --
| Jack Brewster - Microsoft MVP - FrontPage
|
| | > Hello, all -
| >
| > Browsing Kathleen Anderson's website, I followed a link regarding
| > DOCTYPES to a relevant article on the A LIst Apart website (the article
| > is at http://www.alistapart.com/stories/doctype/).
| >
| > What I glean from the article is that a proper DOCTYPE statement must be
| > at the beginning of each web page to ensure proper rendering by modern
| > browsers. However, when I look at the HTML FP2002 is generating for the
| > web pages I'm currently designing, there is no DOCTYPE statement.
| >
| > Eek.
| >
| > Further, A List Apart provides the proper syntax for 7 different DOCTYPE
| > statements. So, my relative newbie questions are:
| >
| > 1. If a DOCTYPE statement is so critical to proper rendering, how come
| > FP2002 doesn't automate, or at least facilitate, the inclusion of one?
| >
| > 2. How do I determine which of the 7 suggested DOCTYPE statements I
| > should include in my pages?
| >
| > Thanks very much in advance for your tips and insights here.
| >
| > Craig Schiller
| >
|
|
 
Jack -

Thanks for your response, but maybe I didn't make myself clear: How do I know
what kind of DOCTYPE. These links reference various XHTML and HTML types, but
that really hasn't shed on light on anything for me. What sort of DOCTYPE is
FP2002 generating for me, is my question, and why doesn't it insert the
information automatically? I know I'm missing something basic here. Sorry
about that.

Thanks,
Craig
 
Tom -

That's in direct contradiction to what I just read on A List Apart. How come
there are varying theories on this?

Thanks,
Craig
 
Craig Schiller said:
Jack -

Thanks for your response, but maybe I didn't make myself clear: How do I know
what kind of DOCTYPE. These links reference various XHTML and HTML types, but
that really hasn't shed on light on anything for me. What sort of DOCTYPE is
FP2002 generating for me, is my question, and why doesn't it insert the
information automatically? I know I'm missing something basic here. Sorry
about that.

Craig,

FP2002 doesn't generate or insert one. If it did, you'd see one in your
document. You'll have to do it yourself for each page.

Both of those links describe, sparsely admittedly, the purpose for each.

If you use one of the XHTML DOCTYPEs, be sure to read the section near the
bottom about "Specifying a Namespace." This is required for your XHTML to
validate correctly.
 
DOCTYPEs are not needed unless you want to validate your web site or use
XML, etc.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Jack -

"HTML 4.01 Transitional
The Transitional DTD is used when you want to support elements that have
been deprecated from HTML 4.01."

Elements deprecated from HTML 4.01?

I'm supposed to know what that means? LOL.

I've read the definitions, Jack. I have no idea how to decide which is the best
for my application. Isn't it just dependent on the type of code in my document?
If so, what are the parameters to look for? I don't see that explained anywhere.
If not, what *is* it dependent on?

Thanks,
Craig
 
Thomas -

Thank you for the link. Reading it prompts these questions:

- How does one choose between an HTML DOCTYPE and the two flavors of xHTML
DOCTYPES? How do I determine which one is appropriate? I assume it has to do
with the type of code contained in my web pages, but what specific things should
I be looking for?

- Once again, why doesn't FP2002 figure this out automatically, or at least
provide guidance to the user?

- The link you provided makes no correlation between the type of rendering done
by various browsers and the DOCTYPES that invoke those types of rendering. Any
place to get that information?

Any further guidance would be appreciated.

Thanks,
Craig

Thomas A. Rowe said:
Craig,

Here is a good resource:

http://www.upsdell.com/BrowserNews/res_doctype.htm

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Craig,

I do not add DOCTYPEs to my pages, and I don't want FP to add them either.

The more things that a application does, the less flexibility, you as the
user would have to do things, the way you want.

As I said in a prior post, DOCTYPEs are really not needed, unless you want
to force a browser to render page very close to the W3C recommendations,
however to do so requires that you also ensure that all of your coding meets
the specific W3C recommendation for the specific DOCTYPE added.

To use DOCTYPEs correctly, you have to study the W3C recommendations.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Craig Schiller said:
Thomas -

Thank you for the link. Reading it prompts these questions:

- How does one choose between an HTML DOCTYPE and the two flavors of xHTML
DOCTYPES? How do I determine which one is appropriate? I assume it has to do
with the type of code contained in my web pages, but what specific things should
I be looking for?

- Once again, why doesn't FP2002 figure this out automatically, or at least
provide guidance to the user?

- The link you provided makes no correlation between the type of rendering done
by various browsers and the DOCTYPES that invoke those types of rendering. Any
place to get that information?

The newer the (X)HTML specification, the more rigid the requirements on your
code.

For example, if you use the HTML 4.01 Transitional DOCTYPE that I suggested
yesterday, you can pretty much write using whatever HTML code you want. If
you use XHTML 1.1 (the most strict) then you must follow coding conventions
such as:
- All tags _must_ be closed.
- <p></p>
- <br />
- <hr />
- Tag and tag attributes must be lower cased and attribute values _must_ be
contained in quotes.
- <img src="image.jpg" />
- not <IMG src=image.jpg>
- You can't use tags that have been deprecated such as <font><b><i>. There
are more, that's just a sample.

Just because I say XHTML is strict doesn't make it a bad thing. It
guarantees (when coded correctly) that your code is future-friendly. Check
out this article:
http://www.alistapart.com/stories/betterliving/

There's a lot in there, but I think by the time you get to the end of it,
you'll have a better idea of what XHTML can do for you and why it's okay to
use DOCTYPEs, even though Tom and Thomas have suggested you don't :-).

As for FP2002 _not_ getting DOCTYPEs? Well, it just doesn't. Standards and
recommended practices have come a long way in the last couple years since it
was released so it's probably unfair to hold it to that standard. That
doesn't mean it's designed to write bad or poor code, contrary to what some
"knowledgeable" folks seem to keep saying. There are plenty of people out
there, and many on this newsgroup, who build standards compliant sites using
FP.

If you only create pages in Edit mode, the likelihood of you getting a
standards compliant page is pretty low. But that's true with any visual
editor, even the much-worshipped Dreamweaver MX. Neither FP or Dreamweaver
(or any other program) are silver bullets that ensure compliance. You have
to be willing to look at and work with the generated code.
 
Thomas -

I understand what you're saying. Still think it would be nice if FP2002 had the
option to add DOCTYPES, which would naturally have to include:
1. The ability to recognize what type of DOCTYPE was required for the website
being created by the program itself
2. *FP2002* ensuring that coding meets the specific W3C recommendation for the
specific DOCTYPE added. User intervention should not be required if FP is
supplying the code!

Regards,
Craig

Thomas A. Rowe said:
Craig,

I do not add DOCTYPEs to my pages, and I don't want FP to add them either.

The more things that a application does, the less flexibility, you as the
user would have to do things, the way you want.

As I said in a prior post, DOCTYPEs are really not needed, unless you want
to force a browser to render page very close to the W3C recommendations,
however to do so requires that you also ensure that all of your coding meets
the specific W3C recommendation for the specific DOCTYPE added.

To use DOCTYPEs correctly, you have to study the W3C recommendations.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Jack -

Thanks for your response. I've copied it so I can concentrate on it when I have
a bit more time. :-)

Regards,
Craig
 
Craig Schiller said:
Thomas -

I understand what you're saying. Still think it would be nice if FP2002 had the
option to add DOCTYPES, which would naturally have to include:
1. The ability to recognize what type of DOCTYPE was required for the website
being created by the program itself
2. *FP2002* ensuring that coding meets the specific W3C recommendation for the
specific DOCTYPE added. User intervention should not be required if FP is
supplying the code!

FrontPage can't recognize what type of DOCTYPE to use. You, as the
developer, determine what DOCTYPE you want to use then code accordingly.
This is true of any application. How could FP, or any software for that
matter make a guess at which DOCTYPE I should use if all it sees is properly
formatted HTML when I've actually written XHTML?

As for FP2002 generating compliant code, I agree it should, but as I
mentioned in my other post, where standards are today is quite different
than when this program was released. When you add in the development time,
the gap gets even wider. That's why the burden is on the developer to check
their code and adjust as necessary.

Web design is very much a hands-on job. If code were dirty, you should need
Lava soap to get it off your hands every day. ;-)
 
Just remember, be careful about what you wish for!

If FP were to do this, then you would not be able to add any custom or 3rd
party code to your pages, because since FP didn't write the code, it would
not be able to ensure that the code meet the W3C recommendations /
DOCTYPEs..

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Jack said:
FrontPage can't recognize what type of DOCTYPE to use. You, as the
developer, determine what DOCTYPE you want to use then code accordingly.
This is true of any application. How could FP, or any software for that
matter make a guess at which DOCTYPE I should use if all it sees is properly
formatted HTML when I've actually written XHTML?

Well, you're looking at it as the expert you are. For us mortals, we use
*FP2002* to generate *all* of the code. So FP should have a feature that says
"if you want your website to be compliant and generate a DOCTYPE, here are the
selections for the type of compliance you can specify. Pick one."

But then, if you DID hand-insert code, FP should say "Hold on bunky, I can't
guarantee compliance any more because you just inserted code, so you're on your
own now and I'm not generating a DOCTYPE so there!"
As for FP2002 generating compliant code, I agree it should, but as I
mentioned in my other post, where standards are today is quite different
than when this program was released. When you add in the development time,
the gap gets even wider. That's why the burden is on the developer to check
their code and adjust as necessary.

Well, that part I understand fully. Darned Internet time!
Web design is very much a hands-on job. If code were dirty, you should need
Lava soap to get it off your hands every day. ;-)

To some of us, code IS dirty! LOL.

Regards,
Craig
 
Thomas -

See my previous to Jack. It would be fine if FP recognized that you'd added
custom or 3rd party code and said "all bets are off, now you're on your own."
But for those of us who are severely code-challenged, it would be nice if FP
could organize this for you as long as it was generating all the code.

Regards,
Craig
 
Having the luxury of reading this entire thread, here are my thoughts (in no particular order):

Using a fully-qualified DOCTYPE (one that includes a link to the W3C site), buys you 2 things:

1. You can validate your page against the specs for the version of HTML that your DOCTYPE says you are writing.
2. Your web page will display in standards mode - usually that means it will display the way you intend it to display.

For HTML 4.01, there are 3 DOCTYPEs to choose from: Transitional (which is the one I use), Frames (which I don't use because I don't do frames), and Strict (which takes more nerve than I have). Jack or someone else that uses XHTML can speak to the others.

The DOCTYPE solution on my site will work in FP2003; in addition, FP2003 has a new feature called "Code Snippets", which lets you store code (HTML, scripts, etc.) in a library and add it to your page with just a couple of keystrokes. FP2003 comes with 3 DOCTYPE Code Snippets - not the same 3 I listed above, unfortunately, they are for HTML 2, HTML 3.2 and HTML 4.01. If you want to use the DOCTYPE Code Snippets, you should modify them first, as they don't contain the second line, the link to the W3C specification.

HTH,

--

~ Kathleen Anderson
Microsoft FrontPage MVP
Spider Web Woman Designs
http://www.spiderwebwoman.com/resources/
 
Back
Top