|
|
|
| |||||||||
TablesMany times information appears better and more orderly when placed inside a table. At this point, tables are a matter of choice. They look good in Netscape and Microsoft's Internet Explorer, but text based browsers such as lynx will not use them and places all of the words one right after the other. Tables can also be used as a work around on getting your page to look more like you want it. For example, this page is a table using three columns. The first column has the buttons for the Creation Web Page. The second column is just a clear graphic used as a spacer and the third column contains all of my text.
<TABLE BORDER=#></TABLE>This is your basic code for tables and will surround all other commands. BORDER=# within the first code indicates what size you want your border to be in pixels. For a normal looking border, replace # with 3 or 5. For a thick border, you might replace # with 10 or higher. When you're using tables as a "page layout" device, replace # with 0 to have no border around the table.Inside your <TABLE> codes, you can use bold text, breaks, lists, and even nested tables if you so choose. Be sure to include the closing </TABLE> code when you are done. If you want your table to be centered on the page, you can place <CENTER> before the <TABLE> code and </CENTER> after the </TABLE> code.
Defining table rows and dataYour basic comands between <TABLE> and </TABLE> will be definining the table rows- <TR> and </TR> and defining table columns and data- <TD> and </TD>. Here's an example of what a table in your Notepad file would look like:
To see how the example table would look like in Netscape, click here. It's a good idea to draw out your table before you start typing in Notepad. Keeping everything straight may become confusing if you don't. Let's look at <TR> and <TD> in detail.
<TR></TR>In our example, everything between the first set of <TR></TR> will appear on the first row of the table. Likewise, everything between the second set of <TR></TR> will appear in the second row of the table. Your <TR> codes are simply defining how many rows you will have in your table. If you want five rows, you will have five sets of <TR></TR>'s.
<TD></TD>These codes indicate data to be put in each column of the row. In our example we had two sets of <TD></TD> inbetween each set of row codes. This told Netscape to make two columns in that row. If only one set of <TD></TD> had appeared between the row defining codes, only one column would be displayed. In between your <TD> codes is where you will put your lists, centers, and bolds. Here's a more detailed example.
To see how the above example would look in Netscape, click here. Now many people might be satisfied with these basic commands and you will be able to manipulate most of your tables using just the simple <TABLE> <TR> and <TD> codes. But what do you do if you only want one column on your first row and two in the remaining rows?
<TD> Expansions
It is possible to combine several of these extensions in one <TD> code. For example you might have a code that looked like <TD COLSPAN=3 ROWSPAN=2 ALIGN=center VALIGN=middle>
<TABLE> Extensions
| |||||||||||
|
Page maintained by Julie A. Duncan, ITS Cameron University, Lawton Oklahoma |
|||||||||||