| 4:26 pm on Feb 6, 2006 (gmt 0)|
Doctypes merely dictate which set of coding standards a given page should be held to. For generally practical purposes, WHICH doctype isn't nearly as important as USING a doctype to begin with. In other words, the most important and upfront differences a doctype makes (the most notable one is that it kicks IE6 into Standards Mode) will be made by any full and valid doctype.
That said, the best doctype, IMO, for someone who doesn't know about them is your #2 above, the HTML4.01 Transitional. This is a little more forgiving than the Strict doctype. I suppose if you use framesets, the Frameset one is best. Somewith with more frameset experience would have to chime in on that one.
Again, the most important things about a doctpye is (a) having one, (b) that it is FULL and VALID, and (c) that it is the very first thing in the source code (not even a whitespace before it).
To ensure that you're using a full and valid doctype, cut and paste it directly from this page [w3.org].
| 5:18 pm on Feb 6, 2006 (gmt 0)|
Thank you CreateMessageError.
Just to confirm, I should use the transitional one right:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
This should come before the following right?...
Is that it? Thanks.
I did see the example putting this too:
<!ENTITY % HTML.Version "-//W3C//DTD HTML 4.01 Transitional//EN"
-- Typical usage:
Is that needed?
| 5:30 pm on Feb 6, 2006 (gmt 0)|
As a differing opinion, I don't feel you want to be 'looser' as you learn html because you may pick up bad habits. Forgiven by the browser you won't understand why it doesn't work, or won't validate, when you switch to strict or xhtml. So learn the details from the beginning and there will be fewer problems later. Use html strict.
| 5:59 pm on Feb 6, 2006 (gmt 0)|
If you are new to web standards and are using tables-based designs, then it is better to start with the HTML 4.01 Transitional doctype. You add it to the very first line of your page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html>
Once your pages validate as HTML 4.01 Transitional, you might want to try HTML 4.01 Strict - this will mean you will need to remve deprecated (outdated) presentational markup and use CSS more extensively.
| 7:08 pm on Feb 6, 2006 (gmt 0)|
Why learn deprecated or outdated markup in the first place? That's my point. Do it right the first time. Just use strict.
|this will mean you will need to remve deprecated (outdated) presentational markup |
| 9:57 am on Feb 7, 2006 (gmt 0)|
I am really confuse now. What is strict and what is transitional really? Will I be wrong in using either one? How do I know when to use what?
Honestly my HTML coding with ASP scripts may not really follow convention completely. I try to but I definately may be wrong here and there. What should I do?
| 11:45 am on Feb 7, 2006 (gmt 0)|
|I am really confuse now. What is strict and what is transitional really? Will I be wrong in using either one? How do I know when to use what? |
According to the HTML 4.01 Transitional DTD:
|... the HTML 4.01 Transitional DTD, ... includes presentation attributes and elements that W3C expects to phase out as support for style sheets matures. Authors should use the Strict DTD when possible, but may use the Transitional DTD when support for presentation attribute and elements is required. |
So, if you need support for deprecated presentational elements [w3.org] and attributes [w3.org] then use the Transitional (also called "Loose") DTD.