The default style of a tabular results in a classic table in black and white with spaced borders and the header cells in boldface. This style can be changed by modifying the tabular CSS values or by specifying predefined css classes from among a variety of styles.
| Column 1 | Column 2 | Column 3 |
| A | B | C |
| D | E | F |
| G | H | I |
| J | K | L |
| M | N | P |
Predefined Styles
The following styles are defined for a tabular and all types of tables:
| Value | Description |
| simple | Collapse the double borders into single rules. |
| small | Reduce the font size of the cells by 90%. |
| tiny | Reduce the font size of the cells by 80%. |
The following styles are defined for tabulars:
| Value | Description |
| spaced | Omit borders and adding spacing between the cells. |
| framed | Add a 1px border around the entire table. |
| halfframed | Add a 1px border on the bottom and the top of the table. |
|
|
| ruled | Use single ruled borders around the cells. |
| dblruled | Use double ruled borders around the cells. |
|
|
| zebra | Create zebra stripes with light gray stripes. |
| tan-zebra | Create light tan zebra stripes. |
| nozebra | Remove zebra stripes for tables with stripes. |
|
|
| whitebar | Add white rules to the header. |
Single Ruled
The spaced borders can be changed to single ruled
Example
source
\begin{tabular}[ncols=3 style=ruled]
\headers{Column 1}{Column 2}{Column 3}
\row{A}{B}{C}
\row{D}{E}{F}
\row{G}{H}{I}
\row{J}{K}{L}
\row{M}{N}{P}
\end{tabular}
| Column 1 | Column 2 | Column 3 |
| A | B | C |
| D | E | F |
| G | H | I |
| J | K | L |
| M | N | P |
results
Double Ruled
Use double ruled black borders
Example
source
\begin{tabular}[ncols=3 style=dblruled]
\headers{Column 1}{Column 2}{Column 3}
\row{A}{B}{C}
\row{D}{E}{F}
\row{G}{H}{I}
\row{J}{K}{L}
\row{M}{N}{P}
\end{tabular}
| Column 1 | Column 2 | Column 3 |
| A | B | C |
| D | E | F |
| G | H | I |
| J | K | L |
| M | N | P |
results
Zebra Stripes
To create the more stylish zebra stripes with gray stripes
Example
source
\begin{tabular}[ncols=3 style=zebra]
\headers{Column 1}{Column 2}{Column 3}
\row{A}{B}{C}
\row{D}{E}{F}
\row{G}{H}{I}
\row{J}{K}{L}
\row{M}{N}{P}
\end{tabular}
| Column 1 | Column 2 | Column 3 |
| A | B | C |
| D | E | F |
| G | H | I |
| J | K | L |
| M | N | P |
results
To create tan stripes instead of gray
Example
source
\begin{tabular}[ncols=3 style=tan-zebra]
\headers{Column 1}{Column 2}{Column 3}
\row{A}{B}{C}
\row{D}{E}{F}
\row{G}{H}{I}
\row{J}{K}{L}
\row{M}{N}{P}
\end{tabular}
| Column 1 | Column 2 | Column 3 |
| A | B | C |
| D | E | F |
| G | H | I |
| J | K | L |
| M | N | P |
results
For tables that have zebra stripes by default, you can turn off the stripes using
Example
source
\begin{tabular}[ncols=3 style=nozebra]
\headers{Column 1}{Column 2}{Column 3}
\row{A}{B}{C}
\row{D}{E}{F}
\row{G}{H}{I}
\row{J}{K}{L}
\row{M}{N}{P}
\end{tabular}
| Column 1 | Column 2 | Column 3 |
| A | B | C |
| D | E | F |
| G | H | I |
| J | K | L |
| M | N | P |
results
Framed Tables
There are two styles available for framed tables
Example
source
\begin{tabular}[ncols=3 style='ruled zebra framed']
\headers{Column 1}{Column 2}{Column 3}
\row{A}{B}{C}
\row{D}{E}{F}
\row{G}{H}{I}
\row{J}{K}{L}
\row{M}{N}{P}
\end{tabular}
| Column 1 | Column 2 | Column 3 |
| A | B | C |
| D | E | F |
| G | H | I |
| J | K | L |
| M | N | P |
results
Example
source
\begin{tabular}[ncols=3 style='ruled tan-zebra halfframed']
\headers{Column 1}{Column 2}{Column 3}
\row{A}{B}{C}
\row{D}{E}{F}
\row{G}{H}{I}
\row{J}{K}{L}
\row{M}{N}{P}
\end{tabular}
| Column 1 | Column 2 | Column 3 |
| A | B | C |
| D | E | F |
| G | H | I |
| J | K | L |
| M | N | P |
results
Changing Font Sizes
Two styles are available for changing the font size used for the content of the table cells.
Example
source
\begin{tabular}[ncols=3 style='ruled tan-zebra small']
\headers{Column 1}{Column 2}{Column 3}
\row{A}{B}{C}
\row{D}{E}{F}
\row{G}{H}{I}
\row{J}{K}{L}
\row{M}{N}{P}
\end{tabular}
| Column 1 | Column 2 | Column 3 |
| A | B | C |
| D | E | F |
| G | H | I |
| J | K | L |
| M | N | P |
results
Example
source
\begin{tabular}[ncols=3 style='ruled tan-zebra tiny']
\headers{Column 1}{Column 2}{Column 3}
\row{A}{B}{C}
\row{D}{E}{F}
\row{G}{H}{I}
\row{J}{K}{L}
\row{M}{N}{P}
\end{tabular}
| Column 1 | Column 2 | Column 3 |
| A | B | C |
| D | E | F |
| G | H | I |
| J | K | L |
| M | N | P |
results