tables.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <h2>Tables</h2>
  2. <table>
  3. <thead>
  4. <tr><th>First Header</th><th>Second Header</th></tr>
  5. </thead>
  6. <tbody>
  7. <tr><td>Content Cell</td><td>Content Cell</td></tr>
  8. <tr><td>Content Cell</td><td>Content Cell</td></tr>
  9. </tbody>
  10. </table>
  11. <table>
  12. <thead>
  13. <tr><th>First Header</th><th>Second Header</th></tr>
  14. </thead>
  15. <tbody>
  16. <tr><td>Content Cell</td><td>Content Cell</td></tr>
  17. <tr><td>Content Cell</td><td>Content Cell</td></tr>
  18. </tbody>
  19. </table>
  20. <table>
  21. <thead>
  22. <tr><th>Name</th><th>Description</th></tr>
  23. </thead>
  24. <tbody>
  25. <tr><td>Help</td><td>Display the help window.</td></tr>
  26. <tr><td>Close</td><td>Closes a window</td></tr>
  27. </tbody>
  28. </table>
  29. <table>
  30. <thead>
  31. <tr><th>Name</th><th>Description</th></tr>
  32. </thead>
  33. <tbody>
  34. <tr><td>Help</td><td><strong>Display the</strong> help window.</td></tr>
  35. <tr><td>Close</td><td><em>Closes</em> a window</td></tr>
  36. </tbody>
  37. </table>
  38. <table>
  39. <thead>
  40. <tr><th>Default-Align</th><th align="left">Left-Aligned</th><th align="center">Center Aligned</th><th align="right">Right Aligned</th></tr>
  41. </thead>
  42. <tbody>
  43. <tr><td>1</td><td align="left">col 3 is</td><td align="center">some wordy text</td><td align="right">$1600</td></tr>
  44. <tr><td>2</td><td align="left">col 2 is</td><td align="center">centered</td><td align="right">$12</td></tr>
  45. <tr><td>3</td><td align="left">zebra stripes</td><td align="center">are neat</td><td align="right">$1</td></tr>
  46. </tbody>
  47. </table>
  48. <table>
  49. <thead>
  50. <tr><th>Simple</th><th>Table</th></tr>
  51. </thead>
  52. <tbody>
  53. <tr><td>1</td><td>2</td></tr>
  54. <tr><td>3</td><td>4</td></tr>
  55. </tbody>
  56. </table>
  57. <table>
  58. <thead>
  59. <tr><th>Simple</th><th>Table</th></tr>
  60. </thead>
  61. <tbody>
  62. <tr><td>1</td><td>2</td></tr>
  63. <tr><td>3</td><td>4</td></tr>
  64. <tr><td>3</td><td>4 |</td></tr>
  65. <tr><td>3</td><td>4 \</td></tr>
  66. </tbody>
  67. </table>
  68. <p>Check https://github.com/erusev/parsedown/issues/184 for the following:</p>
  69. <table>
  70. <thead>
  71. <tr><th>Foo</th><th>Bar</th><th>State</th></tr>
  72. </thead>
  73. <tbody>
  74. <tr><td><code>Code | Pipe</code></td><td>Broken</td><td>Blank</td></tr>
  75. <tr><td><code>Escaped Code \| Pipe</code></td><td>Broken</td><td>Blank</td></tr>
  76. <tr><td>Escaped | Pipe</td><td>Broken</td><td>Blank</td></tr>
  77. <tr><td>Escaped \</td><td>Pipe</td><td>Broken</td><td>Blank</td></tr>
  78. <tr><td>Escaped \</td><td>Pipe</td><td>Broken</td><td>Blank</td></tr>
  79. </tbody>
  80. </table>
  81. <table>
  82. <thead>
  83. <tr><th align="left">Simple</th><th>Table</th></tr>
  84. </thead>
  85. <tbody>
  86. <tr><td align="left">3</td><td>4</td></tr>
  87. <tr><td align="left">3</td><td>4</td></tr>
  88. <tr><td align="left">5</td></tr>
  89. </tbody>
  90. </table>
  91. <table>
  92. <thead>
  93. <tr><th>Mixed</th><th>Table</th></tr>
  94. </thead>
  95. <tbody>
  96. <tr><td>1</td><td>2</td></tr>
  97. <tr><td>3</td><td>4</td></tr>
  98. </tbody>
  99. </table>
  100. <table>
  101. <thead>
  102. <tr><th>Mixed</th><th>Table</th></tr>
  103. </thead>
  104. <tbody>
  105. <tr><td>1</td><td>2</td></tr>
  106. <tr><td>3</td><td>4</td></tr>
  107. </tbody>
  108. </table>
  109. <table>
  110. <thead>
  111. <tr><th>Mixed</th><th>Table</th></tr>
  112. </thead>
  113. <tbody>
  114. <tr><td>1</td><td>2</td></tr>
  115. <tr><td>3</td><td>4</td></tr>
  116. </tbody>
  117. </table>
  118. <p>some text</p>
  119. <table>
  120. <thead>
  121. <tr><th>single col</th></tr>
  122. </thead>
  123. <tbody>
  124. <tr><td>1</td></tr>
  125. <tr><td>2</td></tr>
  126. <tr><td>3</td></tr>
  127. </tbody>
  128. </table>
  129. <table>
  130. <thead>
  131. <tr><th>Table</th><th>With</th><th>Empty</th><th>Cells</th></tr>
  132. </thead>
  133. <tbody>
  134. <tr><td></td><td></td><td></td><td></td></tr>
  135. <tr><td>a</td><td></td><td>b</td><td></td></tr>
  136. <tr><td></td><td>a</td><td></td><td>b</td></tr>
  137. <tr><td>a</td><td></td><td></td><td>b</td></tr>
  138. <tr><td></td><td>a</td><td>b</td><td></td></tr>
  139. </tbody>
  140. </table>
  141. <table>
  142. <thead>
  143. <tr><th></th></tr>
  144. </thead>
  145. <tbody>
  146. <tr><td></td></tr>
  147. </tbody>
  148. </table>
  149. <table>
  150. <thead>
  151. <tr><th></th><th></th></tr>
  152. </thead>
  153. <tbody>
  154. <tr><td></td><td></td></tr>
  155. </tbody>
  156. </table>
  157. <table>
  158. <thead>
  159. <tr><th>Table</th><th>Indentation</th></tr>
  160. </thead>
  161. <tbody>
  162. <tr><td>A</td><td>B</td></tr>
  163. </tbody>
  164. </table>
  165. <table>
  166. <thead>
  167. <tr><th>Table</th><th>Indentation</th></tr>
  168. </thead>
  169. <tbody>
  170. <tr><td>A</td><td>B</td></tr>
  171. </tbody>
  172. </table>
  173. <table>
  174. <thead>
  175. <tr><th>Table</th><th>Indentation</th></tr>
  176. </thead>
  177. <tbody>
  178. <tr><td>A</td><td>B</td></tr>
  179. </tbody>
  180. </table>
  181. <pre><code>| Table | Indentation |
  182. </code></pre>
  183. <p> | ----- | ---- |
  184. | A | B |</p>
  185. <table>
  186. <thead>
  187. <tr><th align="left">Table</th><th>Indentation</th></tr>
  188. </thead>
  189. <tbody>
  190. </tbody>
  191. </table>
  192. <pre><code>| A | B |
  193. </code></pre>
  194. <table>
  195. <thead>
  196. <tr><th>Item</th><th align="right">Value</th></tr>
  197. </thead>
  198. <tbody>
  199. <tr><td>Computer</td><td align="right">$1600</td></tr>
  200. <tr><td>Phone</td><td align="right">$12</td></tr>
  201. <tr><td>Pipe</td><td align="right">$1</td></tr>
  202. </tbody>
  203. </table>
  204. <table>
  205. <thead>
  206. <tr><th align="center">a</th><th align="center">b</th><th align="center">c</th></tr>
  207. </thead>
  208. <tbody>
  209. <tr><td align="center">1</td><td align="center">2</td><td align="center">3</td></tr>
  210. </tbody>
  211. </table>
  212. <table>
  213. <thead>
  214. <tr><th align="left">a</th><th align="center">b</th><th align="left">c</th><th align="center">d</th></tr>
  215. </thead>
  216. <tbody>
  217. <tr><td align="left">1</td><td align="center">2</td><td align="left">3</td><td align="center">4</td></tr>
  218. </tbody>
  219. </table>