Forums | MacLife
You are not logged in.
#1 2008-08-30 9:57 am
- Stan
- Member

- From: Rock Island
- Registered: 2002-04-09
- Posts: 706
Do doctypes matter?
A friend of mine paid someone to make her website. Here's the site's doctype:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Here's an example of the code that's written below that doctype:
Code:
<font size="4">Grant
Writing, Grant Research, Copywriting, Strategic Planning<br>
</font><br>
<br>
<b>
<img border="0" src="Ann1bw.JPG" width="172" height="213" align="left" hspace="10" style="margin-left: 10px; margin-right: 10px">Looking
for help with…</b><br>
· Grant writing?<br>
· Grant research?<br>
· Web site or collateral copy?<br>
· Strategic planning?<br>
· Completing the IRS Form 1023?<br>
· Establishing a nonprofit?<br>
<br>The site seems to work fine in any browser. Of course I'm wondering why someone would choose an XHTML Strict doctype and then put in all that antique mark-up. I'm also wondering if doctypes really matter. As far as I can tell the page would look the same if they had used an HTML 4 doctype or none at all. Has anyone seen an example of a page or site going wrong because of an inappropriate doctype?
Offline
#2 2008-08-30 10:32 am
Re: Do doctypes matter?
The trick is not to omit the doctype because the markup sucks, but to fix the markup.
.tsooJ
Offline
#3 2008-08-30 10:42 am
- Fracai
- Evacipate

- From: St. Elsewhere
- Registered: 2000-05-25
- Posts: 2703
Re: Do doctypes matter?
At least it has a decent design, though the fade in when it loads is a bit odd.
Personally, it'd bug me. But then, I'm sure not everyone shudders at the sight of "<font ..." 
Offline
#4 2008-08-30 10:48 am
- dvpierce
- Negusa Negest
- Moderator

- From: Minneapolis, MN
- Registered: 1999-08-30
- Posts: 16888
Re: Do doctypes matter?
Fracai wrote:
At least it has a decent design, though the fade in when it loads is a bit odd.
Personally, it'd bug me. But then, I'm sure not everyone shudders at the sight of "<font ..."
HTML was fine with version 3.
Just nerds making things harder than they need to be for the sake of job security.
"Now commences the process of cutting off the head, which generally takes from an hour to an hour and a half by an expert workman with a sharp blade." -Reuben Delano, Wanderings and Adventures
Offline
#5 2008-08-30 10:58 am
Re: Do doctypes matter?
Then, by al means, code in HTML3! Just make sure you include the correct doctype, and there shouldn't be any problem.
.tsooJ
Offline
#6 2008-08-30 12:21 pm
- Booksley
- Planely insane!
- From: Toronto, Ontario
- Registered: 2001-02-16
- Posts: 4792
Re: Do doctypes matter?
Stan wrote:
A friend of mine paid someone to make her website. Here's the site's doctype:
snip[
The site seems to work fine in any browser. Of course I'm wondering why someone would choose an XHTML Strict doctype and then put in all that antique mark-up. I'm also wondering if doctypes really matter. As far as I can tell the page would look the same if they had used an HTML 4 doctype or none at all. Has anyone seen an example of a page or site going wrong because of an inappropriate doctype?
One of the ways to make things look more consistent between different browser types and versions is to specify a doctype, and to follow the specifications, which makes the browser render the page using 'standards' mode, as opposed to 'quirks' mode.
So, because the page is being rendered in 'quirks' mode, you're right, it doesn't matter if there's a doctype or not. If the markup was fixed however, there may be differences.
Last edited by Booksley (2008-08-30 12:23 pm)
Offline
#7 2008-08-30 1:31 pm
- Stan
- Member

- From: Rock Island
- Registered: 2002-04-09
- Posts: 706
Re: Do doctypes matter?
Booksley wrote:
One of the ways to make things look more consistent between different browser types and versions is to specify a doctype, and to follow the specifications, which makes the browser render the page using 'standards' mode, as opposed to 'quirks' mode.
Yeah, that's what I always thought. But this site has me wondering.
Booksley wrote:
So, because the page is being rendered in 'quirks' mode, you're right, it doesn't matter if there's a doctype or not. If the markup was fixed however, there may be differences.
When I have a bit more time I might do some experiments to see how much difference the doctypes really make. Heck, I've never had the balls to use strict. Always wimped out and used transitional; now I don't think it really mattered.
I did try it this afternoon with IE 5.2 and all that was shown was a black background. I haven't bothered with Netscape 4. However, those are browser problems, not doctype probs.
Offline
#8 2008-08-30 2:10 pm
- Booksley
- Planely insane!
- From: Toronto, Ontario
- Registered: 2001-02-16
- Posts: 4792
Re: Do doctypes matter?
Stan wrote:
Booksley wrote:
So, because the page is being rendered in 'quirks' mode, you're right, it doesn't matter if there's a doctype or not. If the markup was fixed however, there may be differences.
When I have a bit more time I might do some experiments to see how much difference the doctypes really make. Heck, I've never had the balls to use strict. Always wimped out and used transitional; now I don't think it really mattered.
I did try it this afternoon with IE 5.2 and all that was shown was a black background. I haven't bothered with Netscape 4. However, those are browser problems, not doctype probs.
IE5 and Netscape 4
You don't need to test those browsers. They're both horrible compared to... hell, even IE6. Really, I think that a web developer nowadays needs to test against IE6-8, FF3, and optionally Safari 3 and Opera 9.5.
To the best of my knowledge, different doctypes do not cause a browser to render things differently; there are only two major rendering modes: quirks or standards. This page has a good explanation of quirks mode vs standards mode, and why it exists.
The best advice I can give is to make sure that your web page renders in standards mode, regardless of what doctype you use.
Offline
#9 2008-08-30 2:43 pm
- dvpierce
- Negusa Negest
- Moderator

- From: Minneapolis, MN
- Registered: 1999-08-30
- Posts: 16888
Re: Do doctypes matter?
Alien wrote:
Then, by al means, code in HTML3! Just make sure you include the correct doctype, and there shouldn't be any problem.
.tsooJ
Too much stuff gets deprecated. Isn't <font> support on the chopping block soon?
/misses <blink>
"Now commences the process of cutting off the head, which generally takes from an hour to an hour and a half by an expert workman with a sharp blade." -Reuben Delano, Wanderings and Adventures
Offline
#10 2008-08-30 2:50 pm
Re: Do doctypes matter?
If you specify HTML3 as your doctype, all those tags should work. After all, they're part of HTML3, no?
That is what the doctype specifies!
.tsooJ
Offline
#11 2008-08-30 3:13 pm
- dvpierce
- Negusa Negest
- Moderator

- From: Minneapolis, MN
- Registered: 1999-08-30
- Posts: 16888
Re: Do doctypes matter?
Alien wrote:
If you specify HTML3 as your doctype, all those tags should work. After all, they're part of HTML3, no?
That is what the doctype specifies!
.tsooJ
Hmm... I thought browsers stopped supporting older tags and stuff?
"Now commences the process of cutting off the head, which generally takes from an hour to an hour and a half by an expert workman with a sharp blade." -Reuben Delano, Wanderings and Adventures
Offline
#12 2008-08-30 3:14 pm
Re: Do doctypes matter?
dvpierce wrote:
Alien wrote:
Then, by al means, code in HTML3! Just make sure you include the correct doctype, and there shouldn't be any problem.
.tsooJToo much stuff gets deprecated. Isn't <font> support on the chopping block soon?
/misses <blink>
<font> should be deprecated, and it was, a long time ago. It's easier to set fonts using CSS or even using inline styles.
Most things that have been deprecated were deprecated in favor of simpler alternative code.
Offline
#13 2008-08-30 3:15 pm
Re: Do doctypes matter?
dvpierce wrote:
Alien wrote:
If you specify HTML3 as your doctype, all those tags should work. After all, they're part of HTML3, no?
That is what the doctype specifies!
.tsooJHmm... I thought browsers stopped supporting older tags and stuff?
They support them while in Quirks Mode.
Offline
#14 2008-08-30 3:19 pm
Re: Do doctypes matter?
dvpierce wrote:
Alien wrote:
If you specify HTML3 as your doctype, all those tags should work. After all, they're part of HTML3, no?
That is what the doctype specifies!Hmm... I thought browsers stopped supporting older tags and stuff?
They might have, but I doubt it. (There's a lot of old stuff out there, and there's little reason to drop support for older HTML specs.)
The thing is, by specifying the HTML3 doctype, you tell the browser that the document is HTML3, and it should be interpreted as such, including all those tags that have been deprecated or even dropped in later versions of the spec.
.tsooJ
Offline
#15 2008-08-30 6:04 pm
- Stan
- Member

- From: Rock Island
- Registered: 2002-04-09
- Posts: 706
Re: Do doctypes matter?
dvpierce wrote:
Too much stuff gets deprecated. Isn't <font> support on the chopping block soon?
Font tags were deprecated in HTML in HTML 4 (I think they were new in HTML 3). They're flat out banned in XHTML (or so I thought). As I understand it, "deprecated" means it's allowed but discouraged.
dvpierce wrote:
/misses <blink>
CSS supports blinking.
Code:
{text-decoration: blink;}booksley wrote:
IE5 and Netscape 4
You don't need to test those browsers.
Yeah, I know, I just came across IE5 and was curious.
Offline
#16 2008-08-30 6:14 pm
- Antonio
- Now with more cowbell!

- From: San Francisco, CA
- Registered: 2007-01-16
- Posts: 520
Re: Do doctypes matter?
dvpierce wrote:
Alien wrote:
Then, by al means, code in HTML3! Just make sure you include the correct doctype, and there shouldn't be any problem.
.tsooJToo much stuff gets deprecated. Isn't <font> support on the chopping block soon?
/misses <blink>
Well, you can still set that as an attribute in CSS
(EDIT: just noticed Stan pointed that out... this is what happens when you have a meat-life conversation going on while posting to an online forum.)
matt wrote:
dvpierce wrote:
Alien wrote:
Then, by al means, code in HTML3! Just make sure you include the correct doctype, and there shouldn't be any problem.
.tsooJToo much stuff gets deprecated. Isn't <font> support on the chopping block soon?
/misses <blink><font> should be deprecated, and it was, a long time ago. It's easier to set fonts using CSS or even using inline styles.
Most things that have been deprecated were deprecated in favor of simpler alternative code.
The standards set with doctypes separate behaviors and languages and do tend to encourage good design (visual design in CSS, unobtrusive javascript, etc, etc). And it is easier to set font attributes once for many blocks of text than to do it via markup over and over throughout a page or site.
I tend to agree that it overcomplicates things sometimes- well, okay, much of the time, but it is nice over the long haul to work with one technology/language at a time, rather than having to sift through a lot of extraneous code to get at what I want to get at. Everything's a bit cleaner.
Developing an application with XHTML 1.1 has been particularly interesting, especially when working with javascript. It pretty much enforces the 'unobtrusive' approach, which is something I hadn't dealt much with before.
Last edited by Antonio (2008-08-30 6:21 pm)
“The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents.”
--HP Lovecraft, The Call Of Cthulhu
Offline
#17 2008-08-30 6:33 pm
Re: Do doctypes matter?
Antonio wrote:
The standards set with doctypes separate behaviors and languages and do tend to encourage good design (visual design in CSS, unobtrusive javascript, etc, etc).
No, they don't. Doctype specification does nothing but let the user agent know which standards set to follow.
.tsooJ
Offline
#18 2008-08-30 6:47 pm
- Antonio
- Now with more cowbell!

- From: San Francisco, CA
- Registered: 2007-01-16
- Posts: 520
Re: Do doctypes matter?
Alien wrote:
Antonio wrote:
The standards set with doctypes separate behaviors and languages and do tend to encourage good design (visual design in CSS, unobtrusive javascript, etc, etc).
No, they don't. Doctype specification does nothing but let the user agent know which standards set to follow.
.tsooJ
It does if you're actually trying to validate.
(Hence 'The standards set with').
Last edited by Antonio (2008-08-30 6:48 pm)
“The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents.”
--HP Lovecraft, The Call Of Cthulhu
Offline
#19 2008-08-31 12:25 am
Re: Do doctypes matter?
You make me shake my head, rub my temples, chuckle quietly, and sigh.
Offline
#20 2008-08-31 1:40 am
- Antonio
- Now with more cowbell!

- From: San Francisco, CA
- Registered: 2007-01-16
- Posts: 520
Re: Do doctypes matter?
Daniel wrote:
You make me shake my head, rub my temples, chuckle quietly, and sigh.
But apparently, nothing makes you contribute anything of value or go get a life.
Or fix any of that iWeb garbage you've made. The least you could do with a boxed solution is make it work.
Last edited by Antonio (2008-08-31 1:43 am)
“The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents.”
--HP Lovecraft, The Call Of Cthulhu
Offline
#22 2008-08-31 10:37 am
- mrreet2001
- Member

- From: NW Ohio
- Registered: 2005-05-25
- Posts: 2656
Re: Do doctypes matter?
They knew to put "DOCTYPE" in but they used <br> instead of <br />
that has me scratching my head.
Last edited by mrreet2001 (2008-08-31 10:38 am)
2.2Ghz BlackMB---15" 2.4Ghz MBP(work)---Dual 2.3Ghz G5 (4G Ram, 2x 250G HD)---1.5GHz Powerbook---1.6Ghz G5 iMac ---500Mhz iMac DV
2.4GHz PC --- 1.2Ghz PC laptop
Offline
#23 2008-08-31 12:08 pm
- Stan
- Member

- From: Rock Island
- Registered: 2002-04-09
- Posts: 706
Re: Do doctypes matter?
mrreet2001 wrote:
They knew to put "DOCTYPE" in but they used <br> instead of <br />
Yeah, and did you notice how the "list" was marked up? The IMG wasn't closed either.
Last edited by Stan (2008-08-31 12:09 pm)
Offline
#24 2008-09-02 11:18 am
- sturner
- Royal High Poobah
- Moderator

- From: Carrollton, TX USA
- Registered: 2000-01-31
- Posts: 9915
Re: Do doctypes matter?
Better written browsers are very forgiving aren't they?
The code displayed by the OP is pure crap. Badly written, and certainly not well-formed or valid.
"There were places in the world commemorating those times when wizards hadn't been quite as clever [as to refrain from doing magic when you knew how easy it was], and on many of them the grass would never grow again." Terry Prachett
There are 3 types of people, those who can count and those who can't.
Offline
#25 2008-09-02 12:12 pm
- mrreet2001
- Member

- From: NW Ohio
- Registered: 2005-05-25
- Posts: 2656
Re: Do doctypes matter?
Stan wrote:
mrreet2001 wrote:
They knew to put "DOCTYPE" in but they used <br> instead of <br />
Yeah, and did you notice how the "list" was marked up?
wow I didn't even notice that
2.2Ghz BlackMB---15" 2.4Ghz MBP(work)---Dual 2.3Ghz G5 (4G Ram, 2x 250G HD)---1.5GHz Powerbook---1.6Ghz G5 iMac ---500Mhz iMac DV
2.4GHz PC --- 1.2Ghz PC laptop
Offline





