PDA

View Full Version : DOCTYPE case sensitive?


ubik
04-15-2006, 02:22 AM
are doctypes case sensitive? the page i'm currently working on looks the same with strict and in quirks mode, so im not sure. I was wondering if someone here might know?

lol I just have a bit of trouble memorizing all the changes in caps in a doctype, wondering if they are even necessary?

Kravvitz
04-15-2006, 03:23 AM
Yes, it's case-sensitive.

Copy the one you want from the list on this page: http://www.w3.org/QA/2002/04/valid-dtd-list.html

ubik
04-15-2006, 09:57 AM
does it matter if you have the DOCTYPE on two lines opposed to one? I have seen some people write the doctype like this:


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


instead of:

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

felgall
04-15-2006, 10:14 AM
You can put it on two lines as long as the new line character replaces a space.

Kravvitz
04-15-2006, 10:15 AM
The extra white space characters there are fine.

Edit: felgall, you beat me again. :p