• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Tables
2----------------
3
4Summary
5-------
6
7The Table Extension adds the ability to create tables in Markdown documents.
8
9This extension is included in the standard Markdown library.
10
11Syntax
12------
13
14Tables are defined using the syntax established in [PHP Markdown Extra][php].
15
16[php]: http://www.michelf.com/projects/php-markdown/extra/#table
17
18Thus, the following text (taken from the above referenced PHP documentation):
19
20First Header  | Second Header
21------------- | -------------
22Content Cell  | Content Cell
23Content Cell  | Content Cell
24
25will be rendered as:
26
27<table>
28<thead>
29<tr>
30<th>First Header</th>
31<th>Second Header</th>
32</tr>
33</thead>
34<tbody>
35<tr>
36<td>Content Cell</td>
37<td>Content Cell</td>
38
39</tr>
40<tr>
41<td>Content Cell</td>
42<td>Content Cell</td>
43</tr>
44</tbody>
45</table>
46
47Usage
48-----
49
50From the Python interpreter:
51
52    >>> html = markdown.markdown(text, ['tables'])
53
54