Log in

View Full Version : Doc Types for CSS



angela404
09-25-2008, 02:48 PM
What is the difference between these doctypes and what works best to ensure your page appears like you designed, coded and intended in IE 6 and 7?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

boogyman
09-25-2008, 03:14 PM
html 4.01 strict is the only doctype that you should be using. xhtml is not supported by all current versions of IE and so far is not supported by IE8 thus far in beta development

xhtml 1.0 strict is very stringent and requires the code to conform with the documentation precisely or it will produce an error or a warning

xhtml 1.0 transitional has the same rules as 1.0 strict but is less 'picky' about the code being technically correct.

Moshambi
09-25-2008, 04:41 PM
xhtml 1.0 strict is very stringent and requires the code to conform with the documentation precisely or it will produce an error or a warning



Just curious, is there an IDE or some kind of application that will give you the errors like this?

For example how in Visual Studio for C++ or JCreator at the bottom it will show you the errors and warnings.

Is there something that will do this for xhtml/css?

TheJoshMan
09-25-2008, 05:50 PM
I think I understood you correctly, and if I did then the "developers toolbar" for Firefox does**

**The word "does" is used quite loosely

Medyman
09-26-2008, 03:48 AM
Is there something that will do this for xhtml/css?

You'll need a tool that validates your markup. As Josh suggests, various Firefox plugins aimed at website developers do this. There are features in other browsers that do this as well. If you're asking if there are any IDEs that do this in real time (i.e. displaying an error as you code), I don't know of any.


Also, an overall note about this thread...
Those DTDs are for HTML, not CSS.