Help:Wiki University Wikitext--Tables - Borders





Next Chapter >>

Now that we have a table created, we need to add some borders so it will look more like a table.

Table Border
 {| style=" border:  1px solid red "
 * To add a border around a table, add the border attribute to the opening table tag like so:
 * NOTICE the space between the pipe and the word "style".

Here is the table with the border added: Reminder, the types and border treatments are in lesson Help:Wiki University Wikitext--Borders in the beginning Wikitext's lessons.

Cell borders
You can also put borders around cells:

Each cell now has its own border.


 * NOTICE the width of the table is determined by the text in the cells.
 * NOTICE each cell has the border attribute placed in it. It is a lot of work, but this is the only way it works in the Wiki.

Here is the coding:




 * NOTICE the |- row tag acts like a separator between the attribute in the opening table tag and the next cell.
 * NOTICE that a pipe separates the attribute from the text in the cell. The pipe must be there.

Try these out


 Exercises Check your answers
 * With your table from the previous exercise, put a 15 pixel "ridge" border with a border color of "cornsilk."
 * Put a border for the whole table that is 15 pixels wide, "double" border with a border color of brown.
 * Put a blue border around the cells in the first column 1 pixel thick.

 Quick Quiz
 * Attributes must be separated with a pipe from the contents of the cell
 * A. True
 * B. False


 * You can put borders around rows
 * A. True
 * B. False


 * You can put borders on columns
 * A. True
 * B. False


 * Individual cells can have a border around it
 * A. True
 * B. False

Check your answers

Next Chapter >>