Wednesday, December 01, 2004

How the Web Works: What the Crap is HTML

Ok, we've talked about the browser, and we've talked about the server. Let's now talk about the content. What exactly is HTML? Some people think that writing HTML is "programming". I guess you could call it that, but HTML really is not a programming language. HTML stands for Hypertext Markup Language. Well then, what is a markup language. Let's take a few minutes to define a few terms.



Plain Text
This is just plain ol', unformatted text. Plain text contains no formatting information whatsoever. Microsoft word documents are not plain text. Web pages are (usually) not plain text. Here's an example of plain text:

Tomorrow, I'm going to go to the store. I'm going to buy some candy, some eggs, and Halo 2.



Markup Language: A markup language is a document format that contains formatting information. You can use the same tools to create plain text and markup language document. While this document format does contain stuff other than just text, it is still a document format. Here is an example:

In your browser, you would see:
Tomorrow, I'm going to go to the store. I'm going to buy some candy, some eggs, and Halo 2.

Here is the actual document:
<font color="red">Tomorrow</font>, I'm going to go to the <a href="http://www.amazon.com/">store</a>. I'm going to guy some candy, some eggs, and <font size="+2"><b>Halo 2</b></font>.



So, there you have it. Notice the diffrerences between plain text and markup text. They both contain the same two sentences, but the markup one has some formatting information and one link. Let's talk a bit about that second version of that html text. All that extra crap you see in there is the "markup", as in mark up your document with formatting information. Your browser reads all that and figures out how to draw the document appropriately.

Tune in next time where I will explain you all you readers out there how to use this stuff on your own sites.

No comments: