마크다운 언어를 이용해서 표 만들기(영문)

Source
http://bywordapp.com/markdown/guide.html

TABLES ARE PERFECT TO DISPLAY STRUCTURED DATA IN ROWS AND COLUMNS. MULTIMARKDOWN SUPPORTS THE GENERATION OF TABLES BY USING A COUPLE OF SIMPLE RULES ALONGSIDE THE USE OF THE PIPE CHARACTER – |.

EXAMPLE

| First Header  | Second Header | Third Header         |
| :------------ | :-----------: | -------------------: |
| First row     | Data          | Very long data entry |
| Second row    | **Cell**      | *Cell*               |
| Third row     | Cell that spans across two columns  ||
[Table caption, works as a reference][section-mmd-tables-table1] 

Result

Table caption, works as a reference
FIRST HEADER SECOND HEADER THIRD HEADER
First row Data Very long data entry
Second row Cell Cell
Third row Cell that spans across two columns

Structure

If you are familiar with HTML tables, you’ll instantly recognize the structure of the table syntax. All tables must begin with one or more rows of headers, and each row may have one or more columns.

These are the most important rules you’ll be dealing with:

  • There must be at least one | per line;
  • After the header rows, there must be a line containing only |-:., or spaces;
  • Cell content must be on one line only;
  • Columns are separated by |.

Alignment

To align the data cells on the table, you need to introduce a special row right after the headers, that will determine how the following rows – the data rows – will be aligned.

| Header One | Header Two | Header Three | Header Four |
| ---------- | :--------- | :----------: | ----------: |
| Default    | Left       | Center       | Right       |
HEADER ONE HEADER TWO HEADER THREE HEADER FOUR
Default Left Center Right

The placing of the colon (:) is optional and determines the alignment of columns in the data rows. This line is mandatory and must be placed between the headers and the data rows.

Also, the usage of the | at the beginning or end of the rows is optional – as long as at least one | is present in each row.

Column spanning

To make a cell span across multiple columns, instead of using a single pipe (|) character to delimit that cell, use the number of pipes corresponding to the columns you wish to span.

| Column 1 | Column 2 | Column 3 | Column 4 |
| -------- | :------: | -------- | -------- |
| No span  | Span across three columns    |||
COLUMN 1 COLUMN 2 COLUMN 3 COLUMN 4
No span Span across three columns

NOTE
This is only an introduction to MultiMarkdown’s tables. For the full reference, please refer to the “Tables” section on the MultiMarkdown user guide.

Advertisements

답글 남기기

아래 항목을 채우거나 오른쪽 아이콘 중 하나를 클릭하여 로그 인 하세요:

WordPress.com 로고

WordPress.com의 계정을 사용하여 댓글을 남깁니다. 로그아웃 /  변경 )

Google+ photo

Google+의 계정을 사용하여 댓글을 남깁니다. 로그아웃 /  변경 )

Twitter 사진

Twitter의 계정을 사용하여 댓글을 남깁니다. 로그아웃 /  변경 )

Facebook 사진

Facebook의 계정을 사용하여 댓글을 남깁니다. 로그아웃 /  변경 )

%s에 연결하는 중