ViewsWatchers |
[edit] IntroductionThere are two basic ways to make a table on a wiki
This article is about using HTML coding. This is being developed, and at the moment this is a pretty simple presentation. To see the actual table making code you need to open up each of the following sections, as you get to them, in edit mode. If you want, copy the code you are working with to the sandbox or to your user page, where you can practice without messing up the tutorial. You'll need to practice with this to get the hang of it. [edit] To StartTo start a table, place <table> at the top of the area where the table is supposed to appear. place </table> at the spot where the table is supposed to end. Everything you want to do with the table goes between the above two bits of code. [edit] Add a rowEach table is built up of a number of rows composed of one or more cells. place <tr> where you want the first row to start. place <td> where you want the first cell. Add some more <td>'s to add more cells. You now have a row of cells---with nothing in them [edit] Add dataTo add data to the cells just type something in after each <td> [edit] ResultsYou should now have something that looks like this:
Ugly, Huh!? See next step. [edit] Adding borderThe above gave you a bad looking table---not because you did anything wrong, but because I didn't tell you to include the code for that critical part of a table--cell borders To add a border around each cell, you need to add border=1. The first line of code should look like this:
That will place a simple border around each cell.
Much better. If you use another value instead of "1", you'll get a different effect. Try it. [edit] More RowsThe above gave you a table consisting of one row with three cells. To get a table with two rows, you need to add another set of <tr> and td's
[edit] More Rows and More CellsYou can keep going as much as you want, making bigger and bigger tables.
Beautiful, No? Well, not really, These are pretty bland tables. We can change that with a bit of color [edit] Adding ColorColor to cells is added with a bit of code inserted either into the code that starts a row, (which makes the entire row a certain color), or to the code that produces an individual cell (which makes only that cell a certain color. In either case, the code used is bgcolor=name. Where name is one of a number of possible colors. There's a list of the color names you can use here (There are other ways to do this, but that's more complicated.) Open this section for editing to see the code used to do this. The code to make a row turn blue is
To make an individual cell turn blue:
Here's how a table might look with some color.
|