Looking at the pieces
To create a table, put a <table> tag in the <body> section. This tells the browser that you are going to put a table in your web page. The next step is to start specifying what's going to go in the first row. Each row in a table starts with the <tr> tag. The "tr" in the tag stands for table row. Each cell in the table is started with a <td> tag ("td" stands for table data) and ends with a </td> tag. The end of a row is marked by a </tr> and the end of a table with </table>. That's a little confusing, so the graphic below may help you better understand how the code should be written and what the results will look like. (Note that we included the border lines on the left just to make it easier to read.)
 
To put in another row, add an additional set of <tr></tr> tags with the same number of <td></td> tags as the other rows in the table. To add another column, each table row needs another <td></td> tag. Try adding another column to the table in the HTML Playground.
|