If you were to view the source of most of the pages here, you'd see a header that looks like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
That header SHOULD be on every page, but there's a lot of pages here, and I may have not updated everything yet. Ignoring my laziness for a moment, what's the reason for the header?
It's to help your browser figure out how best to display the page. Unfortunately, browser development has been unstructured and standard deficient until quite recently, and even today there are differences between major browsers. When we start looking at differences for older browsers, it gets much worse, and the other side of that is that older web pages use structure that expects the behavior of older browsers. So YOUR browser, no matter how new it is, has to accommodate older pages.
Mozilla has a
(link dead, sorry)
Quirks page that explains some of the things that
Mozilla will do differently if it is dealing with an older web page.
How does it tell whether or not the page needs to be treated that
way? Well, the DOCTYPE tag (or lack of it) is its first clue. Based
on what it sees or doesn't see, Mozilla adjusts its behavior accordingly,
and hopefully you get to see pages at least close to as their authors
Of course Windows Internet Explorer does similar investigation, though the end results may be slightly different. One reason for that is that the W3C makes recommendations, and doesn't set standards. That leaves Microsoft, Mozilla, and anyone else free to do whatever they want, and leaves web page designers constantly trying to avoid the differences.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2012-07-17 Tony Lawrence
I was taught that the human brain was the crowning glory of evolution so far, but I think it’s a very poor scheme for survival (Kurt Vonnegut).