R
Randy Morgan
While stumbling around looking for good web development practices I came
across several sites talking about a) how important it was to put the
DOCTYPE declaration in web pages and b) how most HTML editors insert an
incorrect or incomplete declaration.
I did some playing around with this, and got unexpected results. I used
a transitional HTML 4.01 declaration, but some things on my page changed
unexpectedly. Two obvious things (there could well be more) are:
1. The entire page is nudged down by several pixels, leaving white space
above the banner.
2. The fill color in the layout cell containing the custom link bar
stops right after the link bar ends.
I saw these problems using IE6, and if it doesn't look right there I'm
almost afraid to see what Firefox or Opera would think of it.
I posted two pages that are identical except for the DOCTYPE declaration
(one has it, one doesn't) at:
http://www.leonardforiowa.com/dev/doctype.htm
http://www.leonardforiowa.com/dev/nodoctype.htm
For the heck of it, I took the doctype page and ran Optimze HTML on it,
selecting everything. It doesn't look to me like it changed anything,
but it's at:
http://www.leonardforiowa.com/dev/doctypeo.htm
In Design View, the doctype page looks fine, meaning that the background
color fills appropriately and there's no whitespace at the top of the
page. Since there's nothing 'broken' in Design View there's nothing for
me to fix, so I'm not sure how to incorporate a DOCTYPE in my pages, but
in browsing around the web in general I see that many commercial website
use them.
I went to this link at MSFT:
http://msdn.microsoft.com/library/d...c_fp2003_ta/html/odc_fpWorkingWithDocType.asp
My summary is that MSFT takes several pages to explain the different
DOCTYPEs and then says that because they use proprietary techniques
FP-generated websites may not validate properly. Fair enough, but this
isn't a validation question, it's a display issue (some might say
they're the same thing, but I would not).
So, what am I missing here? Am I putting the DOCTYPE declaration in the
wrong place (I put it at the very top of the code, before the html tag)?
Am I using the wrong HTML tag (should it be 3.2)? How do I fix or
change whatever is causing the problem if I can't see it in Design View?
Should I even care about DOCTYPE declaration?
Thanks!
across several sites talking about a) how important it was to put the
DOCTYPE declaration in web pages and b) how most HTML editors insert an
incorrect or incomplete declaration.
I did some playing around with this, and got unexpected results. I used
a transitional HTML 4.01 declaration, but some things on my page changed
unexpectedly. Two obvious things (there could well be more) are:
1. The entire page is nudged down by several pixels, leaving white space
above the banner.
2. The fill color in the layout cell containing the custom link bar
stops right after the link bar ends.
I saw these problems using IE6, and if it doesn't look right there I'm
almost afraid to see what Firefox or Opera would think of it.
I posted two pages that are identical except for the DOCTYPE declaration
(one has it, one doesn't) at:
http://www.leonardforiowa.com/dev/doctype.htm
http://www.leonardforiowa.com/dev/nodoctype.htm
For the heck of it, I took the doctype page and ran Optimze HTML on it,
selecting everything. It doesn't look to me like it changed anything,
but it's at:
http://www.leonardforiowa.com/dev/doctypeo.htm
In Design View, the doctype page looks fine, meaning that the background
color fills appropriately and there's no whitespace at the top of the
page. Since there's nothing 'broken' in Design View there's nothing for
me to fix, so I'm not sure how to incorporate a DOCTYPE in my pages, but
in browsing around the web in general I see that many commercial website
use them.
I went to this link at MSFT:
http://msdn.microsoft.com/library/d...c_fp2003_ta/html/odc_fpWorkingWithDocType.asp
My summary is that MSFT takes several pages to explain the different
DOCTYPEs and then says that because they use proprietary techniques
FP-generated websites may not validate properly. Fair enough, but this
isn't a validation question, it's a display issue (some might say
they're the same thing, but I would not).
So, what am I missing here? Am I putting the DOCTYPE declaration in the
wrong place (I put it at the very top of the code, before the html tag)?
Am I using the wrong HTML tag (should it be 3.2)? How do I fix or
change whatever is causing the problem if I can't see it in Design View?
Should I even care about DOCTYPE declaration?
Thanks!