Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Other - Discussion
Author Message
grantb
Regular
Regular



Joined: Feb 16, 2005
Posts: 67
Location: Canada

PostPosted: Wed Oct 12, 2005 12:34 pm Reply with quote

Hello everyone, I have been wondering about the correct DOCTYPE to put in the header. As of this moment I have this:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

But from what I have been reading it should be:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


Using the W3C Validator it shows compliant either way, the only difference that I can see is that when viewing in FireFox all text is centered(posts, blocks, everything) when using the second type from above.

From what I understand is that each browser has it's own DOM and by using the second type from above forces all browsers to use the W3C DOM instead? If this is true, why does the site render differently in the different browsers with the second type but not with the first DOCTYPE?

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Wed Oct 12, 2005 1:50 pm Reply with quote

maybe looking at this would be usefull..

http://htmlhelp.org/tools/validator/doctype.html
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Wed Oct 12, 2005 5:34 pm Reply with quote

The question is whether to be the best or okay as far as compliancy. I would always use the first one.
 
View user's profile Send private message
grantb







PostPosted: Sat Oct 15, 2005 11:58 am Reply with quote

That is what I firgured as well Smile
 
64bitguy
The Mouse Is Extension Of Arm



Joined: Mar 06, 2004
Posts: 1164

PostPosted: Sun Oct 16, 2005 1:23 pm Reply with quote

It really depends on how compliant your domain is.

This is the reason why it is by default set to the lesser value.

If you can test your domain using the latter (with every browser type and version) and you can see the primary pages and "table inside of table" pages (for example the supporters module) as well as forum posts, then you can use the DTD method!

The reason for Nuke using this downgraded default configuration is that the former level puts the latest (5.0 IE and Gecko) browsers into Quirks compatibility mode so that they run like older browser versions; however doing so has an inherant performance cost to those browser sessions.

What it boils down to is that default PHP-Nuke and many add-ons are not coded properly for W3C compliance and this is what has caused this need to force a lower level of session.

If W3C Compliance was actually achieved, you wouldn't need to use the weaker standard.

On my primary domain, I need to use the first method, but on my fully W3C Compliant domains (both HTML and XHTML) I only use the latter methods of including the DTD type links.

_________________
Steph Benoit
100% Section 508 and W3C HTML5 and CSS Compliant (Truly) Code, because I love compliance. 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Other - Discussion

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©