Tuesday, June 16, 2009

HTML Basics

For those interested in web development, let's start with basics.

HTML is an acronym for Hypertext Mark-up Language. It's a mark-up language not a programming language. Just like any language, HTML come with rules for communication. Sentences are made up of nouns, verbs, etc. When you're having a conversation with someone, you don't tell them you're about to talk using verbs or nouns, you simply say the words and communicate the thoughts to the other person.

It's the same way with HTML. Mark-up languages come with tags and these tags provide the skeleton/structure for displaying the content on a website. A web user does not have to be told that a tag, or structure will be used to communciate what's on the web page. The HTML translates the structure and tags to something we can visibly read or view.

Here are a few common tags:

<table> </table>
<strong> </strong>
<p> </p>

Do you see a pattern? Notice that the starting tags end with slashes to close the ending tags. The general rule is that if you open or start a tag, you need to close it.

Any content that you put in between these tags will then display on a web page. To try this on your computer, you will need to create an html page.

  1. Go to your desktop.
  2. Right click on the desktop and click on new file.
  3. Assuming that you have the extensions (.doc, .xls, html) turned on, rename the new file to mytestpage.html.
  4. Once the file has been made, right click on it and open with Notepad or Wordpad.
  5. Copy <p>hello world </p> to the page and click save.
  6. Double click on the file to view it in the browser of your choice.
  7. Congratulations! You've just create your very first HTML page.
Now experiment with a few more tags, like the <strong> </strong> and <table> </table> tags. We'll get into to other tags soon.