A Simple Way to Create Web PagesWorking with TablesTables allow you to control the placement of text and images on your pages. Learning tables may seem difficult at first, but they are worth learning. They are the only way to align text and images vertically on a page. Some Table BasicsA table is made up of columns and rows that together create cells. Rows go across, columns go down and data cells are the individual sections where columns and rows intersect. This table has four rows, three columns and twelve data cells.
Create a Simple TableTo create this table, type: <table> <tr> <tr> <tr> </table> You always type <table> before the text you want to appear in a table. Type </table> after the text you want to appear in the table. Type <tr> to start a row. Type </tr> to end a row. Type <td> to start a data cell and type </td> to end a data cell. You specify each table row and each row's table data one row at a time. Remember to add the </table> tag after you are finished with your table. Leaving off the </> (end) tags can wreak havoc with a table. Modifying the Table DataTo add a border around your table and table data cell, type <table border="1">. You can specify any number up to 7. You can center a table by adding an align attribute: <table border="1" align="center">. To display a caption, type <caption> right below the <table> tag. Type your text and then type </caption>. You can align the data in a cell by adding the align attribute to the <td> tag. Type <td align="center"> (you can use left and right as well) to align horizontally or <td valign="top"> (you can use middle and bottom as well) to align vertically. You can specify font color and size in a table by using the font tags right before and immediately after the text you want formatted.
Computer Infotech® Maine Web Design & Hosting Services (207) 223-5103 Contact Us Copyright 2000 by Computer Infotech®
Updated December 2004 |