Forum Moderators: open
<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -->
I understand the purpose of the "<!DOCTYPE" declaration, but I don't understand why it's preceded by "<!-- ". That comments it out, no?
Is there any good reason for that, or is it effectively just creating a page with no declared doctype?
For context: This is a brand new site, developed in Drupal (5.6). The site has a custom theme, and I believe what's setting this behavior is the page.tpl.php
Thanks,
P
.some_element { color: ff0000; }
works fine but as soon as you use a valid doctype you need
.some_element { color: #ff0000; }
Because #ff0000 is a valid color specification in standards mode, ff0000 is not.
So until I had time to fully understand coding to standards, I left the documents in quirks mode.
The problem then becomes hacking up the code and style sheets to get all browsers to play along. :-)
So most often I would guess it's because the developer doesn't understand why a valid doctype messes up their layout.