Help:Wiki University Wikitext--Tables - Rows

Row backgrounds
If we are making changes to cells in a row, rather than putting code into each cell, we can put the coding in our row tags. Lets use our demonstration table again, this time without borders on the cells Lets say we want to place a background color to the heading row, we simply add the background-color attribute to the row tag like so:
 * |- style=" background-color:lightgreen; "

Our table will now look like this:

Changing font-family in rows
|- style=" background-color:lightgreen; font-family:new times roman; "
 * If you are going to change the font-family in all the cells in a row, install the code in the row tag. Here we will add it to the background attribute like so:

Changing font-size
|- style=" background-color:lightgreen; font-family:new times roman; font-size:14pt; "
 * To change the font-size in a row install the code in the row tag. Here we will add it to the above changes like so:

Changing text color
Let change text color to white with color attribute: |- style=" background-color:lightgreen; font-family:new times roman; font-size:14pt; color:white; "

Changing height of rows
If you want the row to be taller you can add the height attribute: |- style=" background-color:lightgreen; font-family:new times roman; font-size:14pt; color:white; height:50px; "

Attributes that DO NOT work
These attributes DO NOT work in row tags and must be place in cell tags to function. width: text-align: border: Please note: There is no easy way to do columns. You just have to place the codes in each of the cells of the column. Sorry.
 * So if you want to center the font, control the width of the cell or place a border around each cell, you must put this coding in each of the cells you want it to apply.

 Exercises
 * With our above table place a yellow border, "dashed" style and 10 pixels thick.
 * Made the table 500 pixels wide.
 * Next place a blue border around the headers.
 * Install our Healthy Foods caption with any font;
 * Install the headers for each of the columns.

Check your answers >

 Quick Quiz
 * The headers are always centered on the column.
 * A. True
 * B. False


 * You have to use the text-align to put the header on the left side
 * A. True
 * B. False


 * Headers are never in bold type.
 * A. True
 * B. False

Check your answers >