Lesson Seven

Objectives:

  • See How Tables Work
  • Document Your Code

How to Make Tables


So far you've been stuck with putting all your HTML code into a straight forward left-to-right flowing document. Wouldn't it be better if you could organize your page more like a newspaper with columns? The answer is Tables. After learning how to make tables, you'll have a much greater deal of control over how your web pages look. I've made a series of examples for you to look at, starting from the simplest tables imaginable to those that are more complex.

You will notice something different in the code for these samples. I've added what are called comments. You'll recognize comments because they are enclosed in brackets with an exclamation point on the left side and hyphens on both ends like this:



Comments are super important because they are how one programmer explains his or her code to other programmers. Anything you type in these special brackets will not display on the web page. They will only be visible if the viewer views source.

In the real world, most web sites are designed by more than one person. Comments make it possible for programmers to help each other out. Without comments,it can be very hard to understand why one programmer wrote code in a particular way.

As you roll through these pages, stop and view source on each with Notepad maximized, so you can see all my comments. Ready? Let's go!

Table Examples >>.

When you are finished studying the examples, you may do the table assignment:

Table Assignment >>

<< Back to Skyline