markdown table 语法
时间: 2023-06-30 18:24:49 浏览: 103
Here's the syntax for creating a Markdown table:
1. Start the first line with a vertical bar (`|`) and separate each column with a vertical bar. End the line with a vertical bar to close the table header.
2. On the second line, create a separator row using hyphens (`-`) and vertical bars (`|`). The hyphens should be in the same positions as the column headers in the first line.
3. On the following lines, add the table content using the same format as the first line. Separate each cell with a vertical bar and end the line with a vertical bar.
Here's an example of the syntax:
```
| Column 1 Header | Column 2 Header | Column 3 Header |
| --------------- | --------------- | --------------- |
| Row 1 Column 1 | Row 1 Column 2 | Row 1 Column 3 |
| Row 2 Column 1 | Row 2 Column 2 | Row 2 Column 3 |
```
You can also add formatting to the content within the table cells, such as bold or italic text, using Markdown syntax.
阅读全文