In the early days of HTML, there was only really one browser around and that was Mosaic. At first the only web pages were basic text type pages with hyperlinks, later came the ability to insert images, sound files, etc. As new ideas came up and pages began to incorporate more cool things newer browsers showed up as well. These later browsers were not free, but they had all kinds of nifty addons that could make pages spin, sparkle and whatever you could imagine.
Browser Wars
Around the mid-90s, there were two main browsers competing for customers: Netscape and Internet Explorer. You see, Microsoft being who they are, just didn't want to be undone in any area of computer software development and if a dollar was there to be earned, they would get into it. So, following the lead of Netscape, who began making their own tags much earlier on, they too started crafting their own tags for use with Internet Explorer only. This began the so-called Browser Wars with each company going tit-for-tat. The problem with this war was that it resulted in numerous websites being unable to be seen depending on which browser you used and which standard you used to code your pages with.
In 1994, prior to the Browser Wars, a consortium of web design experts, including the father of HTML and the web browser, Tim Berners-Lee, decided that there needed to be a somewhat official guiding body at the global level to guide HTML development. Thus was born the World Wide Web Consortium or W3C for short. The main concern of the W3C was to develop a strict, standardized form of markup language for the web and push that. This new standard was called extensible markup language (XML) and made it so all tags were using lower case only and pretty much all tags had both and opening and closing. If you tried to shortcut it or did it wrong, you would get an error (HTML most times didn't care).
At some point, people got tired of the lack of concise standards between browsers and the incompatibility it created, so the major browser companies and the W3C got together to hash out a new set of standards that everyone agreed to follow. This resulted in the eventual combination of XML and HTML (XHTML). They also agreed that in order to clean up the code, they would need to take the style or format out of HTML and put it in another file, something called a cascading style sheet or CSS. With CSS, rather than code each page separately to reflect how you wanted it to look. You could do that in one place and just reference the style sheet in your HTML code. The current version of HTML is 4.1 and XHTML is 1.0 with HTML 5.0 on the horizon. Most documents now follow the XHTML 1.0 standard.
Doctypes
With the various forms of HTML, XML and XHTML out there, sometimes a browser has a hard time deciding what to go with when rendering and causes various errors in parsing the data. With that in mind, the W3C crafted the doctype tag. The doctype tag basically says what standard you are using so the browser can correctly render it. There are three main divisions for each doctype: strict, transitional and frameset. Strict keeps the code pure, transitional allows font and styling in the code (kind of mitigates the use of CSS) and frameset allows styling and the inclusion of frames (visible divisions in the page). The doctype tag always goes at the top of the webpage and will be included in my examples from here on. Some good examples of how doctypes look are on the W3 Schools website.



