Forum Moderators: open

Message Too Old, No Replies

Do Pages Perform Better With A DOCTYPE Statement?

         

austtr

8:58 am on Jul 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



While HTML purists argue in favour of always including a correct DOCTYPE statment, there is a lot of published comment that says its not necessary...and that not having it makes no difference.

One of our forum members recently offerred me some advice which included using a DOCTYPE on all pages. The advice was offered with a view to "doing it right" rather than avoiding a known bear trap.

On further investigation across my sites, I found the ones that performed OK in Google all had a DOCTYPE statement on the pages. The sites that are performing badly were all missing the statement.

Now let me quickly jump in and say that this is a group of no more than 10-12 sites and the result may be entirely co-incidental.

After dabbling around with various searches, it seems the top results are a mix of pages with and without the statement and that may well be due to the effect of links outweighting all else.

But further down the scale.... two similar sites with equal linking, will the one with a DOCTYPE statement rank higher?

Do we have anything other than conjecture and guesses on this subject?

kaled

9:46 am on Jul 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My understanding is that the DOCTYPE statement is essentially a comment to suggest a rendering mode to the browser. I believe that Opera ignores it completely (but I could be mistaken).

From an SEO perspective, DOCTYPE is almost certainly irrelevent. Search engines are interested in the text of a page not how it's rendered.

My site does not have DOCTYPE statements because the ancient authoring software I'm still using spits the dummy if I include them. When I change to modern authoring software, I will include DOCTYPES, but I doubt my SERPS will improve as a result.

Kaled.

MatthewHSE

2:50 pm on Jul 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



there is a lot of published comment that says its not necessary...

I can handle that. It's not really, absolutely necessary.

...and that not having it makes no difference.

I strongly disagree with that statement. Using the proper doctype makes a tremendous difference in how pages are rendered by both Mozilla and IE 6. I've used the strict doctype so long now that I have a terrible time trying to create a page without it.

victor

3:19 pm on Jul 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I found the ones that performed OK in Google all had a DOCTYPE statement

One slight theory that may account for some of that:

Someone asks me to give them a link. I look at the site. I don't use IE. The site looks crap. That's not a link I could recommend my users to follow. So no link.

But if the site had had a DOCTYPE and validated HTML perhaps it wouldn't have looked crap in my browser of choice.

So it'd get another link from a high-ish PageRank site.

(And the site owner probable still thinks that -- with 95% of visitors using a browser that claims to be IE -- there is no need for any cross-platform timewasting.....They haven't qualified their stats to see if the other 5% are all webmasters they've asked to give a link. Could be a bad mistake).

Dudermont

12:10 am on Jul 10, 2004 (gmt 0)

10+ Year Member



Opera 7 has started using standards-compliant mode when there is a valid DOCTYPE. Otherwise it will render in Quirks Mode.

There is no advantage in not having it so why would you leave it out?

When doing anything more then very basic css it will make a difference in how your pages look as was already pointed out.

I always validate my pages, and it is also required for that.

tedster

12:40 am on Jul 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There is no advantage in not having it so why would you leave it out?

Some things don't work the way you intended if you were proofing your pages in Quirks Mode - for instance, old pages you authored years ago. And Opera's Standards Mode, if I remember correctly, also omits a few things about fully standard rendering, such as always aligning inline images to the text baseline and not the bottom of the block.

If you're working with legacy materials, you may not have the immediate resources to develop a Standards Mode mark-up. In cases like this, a quick fix can be ensuring that modern browsers stay in Quirks Mode by omitting the W3C url.

Dudermont

12:54 am on Jul 10, 2004 (gmt 0)

10+ Year Member



Yeah I see if it is an existing page. I was thinking more from the point of new pages, but he was asking about his existing sites.

I still see people creating pages without it and I don't see any advantage to that. But then again, I don't know if the people doing it know what Quirks mode is or not.

bedlam

6:06 am on Jul 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you're working with legacy materials, you may not have the immediate resources to develop a Standards Mode mark-up. In cases like this, a quick fix can be ensuring that modern browsers stay in Quirks Mode by omitting the W3C url.

This is a very good point when you are working with existing 'tag-soup' pages. But when developing new pages, there is one extremely good reason for using a doctype and validating pages: quality control.

Aside from the obvious benefits of forcing browsers into standards modes (which means that the browser will at least theoretically try to render the declared standard according to w3c rules), having a standard to test your pages against provides a way of debugging rendering problems. It almost doesn't matter what the standard is, as long as it you consistently author your pages according to it.

If you author your pages without a standard, you have no good way of isolating just what causes a given problem, and no way of determining if the fix for that problem (provided you find one) is, or is not, itself the cause of some further problem...

It's been my experience that working in standards mode with sophisticated CSS - which is arguably a more complex process - is actually quite a lot faster than the 'tag-soup' development methods of the 90's were.

-B