A table is a collection of rows, used to represent records of related information, and columns, used to represent fields of data you wish to track. A table can have headings for columns, so you have a quick reference to tell you what type of data to expect in each column. A cell is the intersection of a row and column; the value in the cell should be that record's value for the field represented by that column. Sometimes a caption can help to interpret a table, so you know the purpose. Sometimes a header or footnote will be added to further explain items. HTML tables are just the same as spreadsheets, and are as easy to manipulate.
Once the table has been established, you'll need a row. Between your open and closing table tags, place a
The row establishes the fact that you'll have a new record, but now you need the intersections of columns and rows, so create some cells. The
���
������
������
������
���
���
������
������
������
���
Between the open and closing tags for the cells, enter some data. For example, put a team name in the first cell of each row, a stadim address in the second, and the stadium name in the third. My table looks like this:
Tampa Bay Buccaneers | One Buccaneer Place, Tampa, FL | Raymond James Stadium |
San Francisco 49ers | 3Com Park, San Francisco, CA | (Candlestick forever!!) |
Well, that's a little bit better. But the text seems to just flow right from one cell to another, so all the text looks jumbled or weirdly spaced. And there's nothing in the table to tell you what each column is for; you only know because I specified in text what information would be in each column. Now we need to work on the presentation, and cleaning the appearance up.
We were also having issues with separating the cells, where all the text was flowing together. We can solve this by placing borders around the cells of our table. In the
Team Name | Stadium Address | Stadium Name |
---|---|---|
Tampa Bay Buccaneers | One Buccaneer Place, Tampa, FL | Raymond James Stadium |
San Francisco 49ers | 3Com Park, San Francisco, CA | (Candlestick forever!!) |
It displays like this:
Team Name | Stadium Address | Stadium Name |
---|---|---|
Tampa Bay Buccaneers | One Buccaneer Place, Tampa, FL | Raymond James Stadium |
San Francisco 49ers | 3Com Park, San Francisco, CA | (Candlestick forever!!) |