APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

2005/03/24 DOCTYPE

© March 2005 Tony Lawrence

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"

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 www.mozilla.org/docs/web-developer/quirks/quirklist.html (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 intended.

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.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version


Inexpensive and informative Apple related e-books:

Photos for Mac: A Take Control Crash Course

Take Control of Pages

Take Control of iCloud

Take Control of Numbers

Sierra: A Take Control Crash Course

More Articles by © Tony Lawrence

Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us

Printer Friendly Version

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).

Linux posts

Troubleshooting posts

This post tagged:


Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode