size: 1 KiB
| 1 | Simplest table: |
| 2 | |
| 3 | ``` |
| 4 | | a | |
| 5 | . |
| 6 | <table> |
| 7 | <tr> |
| 8 | <td>a</td> |
| 9 | </tr> |
| 10 | </table> |
| 11 | ``` |
| 12 | |
| 13 | ``` |
| 14 | |a| *b*| |
| 15 | |*c| d* | |
| 16 | . |
| 17 | <table> |
| 18 | <tr> |
| 19 | <td>a</td> |
| 20 | <td><strong>b</strong></td> |
| 21 | </tr> |
| 22 | <tr> |
| 23 | <td>*c</td> |
| 24 | <td>d*</td> |
| 25 | </tr> |
| 26 | </table> |
| 27 | ``` |
| 28 | |
| 29 | ``` |
| 30 | | `a |` |
| 31 | . |
| 32 | <p>| <code>a |</code></p> |
| 33 | ``` |
| 34 | |
| 35 | ``` |
| 36 | | a | b | |
| 37 | |
| 38 | ^ With a _caption_ |
| 39 | and another line. |
| 40 | . |
| 41 | <table> |
| 42 | <caption>With a <em>caption</em> |
| 43 | and another line.</caption> |
| 44 | <tr> |
| 45 | <td>a</td> |
| 46 | <td>b</td> |
| 47 | </tr> |
| 48 | </table> |
| 49 | ``` |
| 50 | |
| 51 | Table headers: note that we can have multiple headers; each |
| 52 | determines the alignment for following cells, until the next header. |
| 53 | |
| 54 | ``` |
| 55 | |a|b| |
| 56 | |:-|---:| |
| 57 | |c|d| |
| 58 | |cc|dd| |
| 59 | |-:|:-:| |
| 60 | |e|f| |
| 61 | |g|h| |
| 62 | . |
| 63 | <table> |
| 64 | <tr> |
| 65 | <th style="text-align: left;">a</th> |
| 66 | <th style="text-align: right;">b</th> |
| 67 | </tr> |
| 68 | <tr> |
| 69 | <td style="text-align: left;">c</td> |
| 70 | <td style="text-align: right;">d</td> |
| 71 | </tr> |
| 72 | <tr> |
| 73 | <th style="text-align: right;">cc</th> |
| 74 | <th style="text-align: center;">dd</th> |
| 75 | </tr> |
| 76 | <tr> |
| 77 | <td style="text-align: right;">e</td> |
| 78 | <td style="text-align: center;">f</td> |
| 79 | </tr> |
| 80 | <tr> |
| 81 | <td style="text-align: right;">g</td> |
| 82 | <td style="text-align: center;">h</td> |
| 83 | </tr> |
| 84 | </table> |
| 85 | ``` |
| 86 | |
| 87 | ``` |
| 88 | |--|--| |
| 89 | . |
| 90 | <table> |
| 91 | </table> |
| 92 | ``` |
| 93 | |
| 94 | ``` |
| 95 | |---|---| |
| 96 | | a | b | |
| 97 | . |
| 98 | <table> |
| 99 | <tr> |
| 100 | <td>a</td> |
| 101 | <td>b</td> |
| 102 | </tr> |
| 103 | </table> |
| 104 | ``` |
| 105 | |
| 106 | ``` |
| 107 | | | |
| 108 | . |
| 109 | <table> |
| 110 | <tr> |
| 111 | <td></td> |
| 112 | </tr> |
| 113 | </table> |
| 114 | ``` |
| 115 | |
| 116 | ``` |
| 117 | | just two \| `|` | cells in this table | |
| 118 | . |
| 119 | <table> |
| 120 | <tr> |
| 121 | <td>just two | <code>|</code></td> |
| 122 | <td>cells in this table</td> |
| 123 | </tr> |
| 124 | </table> |
| 125 | ``` |