The websites I've designed had no problem before but now I see DOCTYPE line red in Firefox 11. There is no problem in validation. I changed encoding to UTF-8 without BOM but problem still exists.
http://validator.w3.org/check?uri=genelvana.com
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Isn't it because Transitional
doctype isn't really valid anymore unless you are using legacy code?
Surely now if you build a website now, should you be using strict or html5?
Same here while Fx6 didn't color it in red.
While hovering this first line, a tooltip appears saying
Almost standards mode doctype. Expected "<!DOCTYPE html>".
You can safely forget this "advice" IMHO. The important thing to do is choosing a valid doctype and then write code that is conformant to this doctype, as you already do. No browser cares about what follows html
so the contrary is true too: no browser cares if there's something after html
;)
Of course, if you use HTML5 elements and technologies (nav
element, canvas
or whatever) then yes use the HTML5 doctype.
It's not so much an error, as it is a warning. Firefox is simply alerting you that the DOCTYPE you are using, XHTML 1.0 Transitional, triggers Almost standards mode, instead of Standards mode.
If you want the page to be displayed in Standards mode, all you need to do is change the DOCTYPE to either XHTML 1.0 Strict or HTML 5.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With