The starting point for anyone interested in making web sites is HTML - it is the most common form of displaying data on the web. While it is true that you no longer have to have HTML to make a web page, BILLIONS (literally) of sites still are built around HTML making it an essential part of your knowledge toolkit. HTML is also the simplest language in the web world.
HTML stands for Hypertext Markup Language. HTML is NOT a real programming language like C++, PHP, or ASP.NET. Instead think of HTML like Microsoft Word – It helps you to change the way something looks. For instance if you write something in Microsoft Word you can make your text centered, bold, red, or whatever you want. You can even add pictures and background colors.
On the other hand, the data outputted by PHP, C++, and ASP is like Microsoft’s notepad in the way that the text you type just comes out plain. When you type something into notepad there is no way to make what you type a different font, color, size or even to BOLD it. Notepad just leaves you with a plain, boring document. Another thing to note is that in notepad there is no way to format the layout! The page is all just left aligned and you can’t separate content.
That is why you will never find a site that is only PHP, ASP, Coldfusion, .NET, Pear, etc… all of these dynamic languages require HTML(or its sister format languages) to format and make their information look good!
The best part about HTML is that it is REALLY simple to learn! I took my first College class in HTML when I was only thirteen and it was a piece of cake! Basically, you just need to remember 20 terms and how to use them. So you brilliant people out there that speak two different languages will probably have this down in 5 minutes!
Anyway, lets make an HTML document. Unlike PHP or ASP you don’t need to setup or install anything to start running HTML pages. All you do is open up Microsoft notepad or the Mac equivalent and type the following:
<html>
<body>
<center>
<p>Hello World</p>
</center>
</body>
</html>and save it as "helloworld.html" (with the quotes). Go to the location of the file (probably "Desktop" or "My Documents") and double click the file to open it. You will see your "Hello World" text in the center of the page. And there we go, your first HTML file!
Now I want to take a minute and explain the tags. "" is the first tag you type in your HTML document. It tells the computer that the following code is HTML so that the computer can process it right.
The next tag is "" this tells the computer that this is the "BODY" of your page – the place where what the user should see belongs.
The "<center>" tag centers the page.
The "<p>" stands for "paragraph" and just means that you are about to display text to the browser. (Like our "Hello World")
Finally, I want you to notice that for every "<tag>" there was a closing "</tag>". When ever you write a tag in HTML you need to CLOSE it when you are done with it. And if you noticed I closed the tags like this:
<first tag>
<second tag>
<third tag>
<end third tag>
<end second tag>
<end first tag>You close the first tag you start, last, you close the second tag you start second to last, and you close the last tag you start first, extra… But don’t worry; you will get the hang of it soon.
Just stumbled across your lessons....wow!
Great stuff, I've learned a lot.
If you're not a teacher by now, you should consider....
Thanks,
joel