Tables¶
Grid Tables¶
+---------------------+----------+
| Header 1 | Header 2 |
+==========+==========+==========+
| cell 1 | cell 2 | cell 3 |
+----------+ +----------+
| cell 4 | | cell 6 |
+----------+----------+----------+
|
Header 1 |
Header 2 |
|
|---|---|---|
|
cell 1 |
cell 2 |
cell 3 |
|
cell 4 |
cell 6 |
|
Sortable Tables¶
Use a div element with the class table-sortable to make a table sortable.
/// html | div.table-sortable
| Name | Age | Country |
|------|-----|---------|
| John | 27 | USA |
| Jane | 23 | Canada |
| Doe | 45 | UK |
///
| Name | Age | Country |
|---|---|---|
| John | 27 | USA |
| Jane | 23 | Canada |
| Doe | 45 | UK |
Multimd Tables¶
properdocs.yml
markdown_extensions:
- pymdown_multimd_table:
rowspan: true
attr_list: true
multiline: true
-
rowspan(^^) andcolspan(||) can be used to create multi-row and multi-column cells.A B C tall 1 2 y -
Multiline cells can be created using a backslash (
\) at the end of a line.| Code | Output | | --------------- | ------- | | ``` | - item 1 |\ | print("hello") | - item 2 |\ | ``` | |Code Output - item 1
- item 2
-
The
attr_listoption allows you to add attributes to table cells using curly braces ({}).Name Age John 27 Jane 23