Apr 19, 2006 In the world of web developing there are many uncertain elements, but one thing you
can always count on is the different rendering of HTML and CSS in the various browsers.
A serious web craftsman tests for inconsistencies in Firefox, IE, Safari and Opera
and makes the appropriate adjustments. That’s just something you have to do, even
if your mark-up is W3C standards compliant.
Today, I came across an article describing the Gecko’s
“Almost Standards” mode, which in essence says that the Gecko engine (the rendering
engine used in Firefox, Mozilla and Netscape) has a mode somewhere between the Quirks
and Standards mode. This “Almost standards” mode is triggered when the DOCTYPE isn’t
strict. That means it is triggered by the default DOCTYPE in ASP.NET 2.0 which is
XHTML transitional.
I had to try it out to believe it, and sure enough, there is a difference. This newfound
knowledge will make it a little easier to make a website look good in all major browsers
when the DOCTYPE is strict, because the rendering will be in Standards mode in all
the browsers. It doesn’t matter if you do HTML or XHTML as long as the DOCTYPE is
strict.
Here are the HTML and XHTML strict DOCTYPE definitions.
HTML 4.01
<!DOCTYPE
HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
XHTML 1.0
<!DOCTYPE
HTML PUBLIC
"-//W3C//DTD HTML 4.01 Strict //EN" "http://www.w3.org/TR/html4/strict.dtd">
Update April 20th: Opara 8.5 has something similar to "Almost Standards" mode.
I haven't been able to find any documentation, but I did some tests.
* Only $4.95/month ASP.NET & Windows 2008 + IIS 7 Hosting! FREE SQL Included