Sometimes it’s not obvious how a document is being interpreted by a web browser. For instance, you might write some XHTML 1.1, but the browser actually interprets it as HTML 4. You may be expecting the browser to be using Standards Mode (recommended), but it might actually be using Quirks Mode because you missed the DOCTYPE statement. I’ll periodically update this blog entry to keep track of how to do this stuff in a variety of browsers.
Here’s a list of how to determine the content type (text/html, text/plain, application/xhtml+xml) that the browser is interpreting:
- Firefox: Go to Tools > Page Info. This tells you the type (text/html) and the rendering mode (Quirks or Standard)
- Opera: Go to View > Panels, then click on the Info button in this panel. You can also click the left edge of the Opera window to get the Panels sidebar open.
- Konqueror: Go to View > Document Information. This tells you the document type (text/html).
If someone has a clue how to determine the content-type in IE (the developer toolbar didn’t help), Safari, Camino, please drop me a line below…
Firefox’s Tools > Page Info dialog box also tells you the rendering mode.
Again, drop me a line below if you know of a way to do this in a specific browser.