Abhishek Agrawal
Abhishek Agrawal

Reputation: 1

Issue with rending table in Readme.md

I want to add a table in readme.md and I am using below code/lines but its not rendering properly

    | Relational | Non-Relational |
    |------------|----------------|
    | Standardized | Non-Standardized |
    | Vertically Scalable | Horizontally Scalable|
    | Fixed Schema | Dynamic Schema |
    | ACID | BASE |
    | Efficient and reliable to handle complex code | Simple and flexible to handle significant changes but inefficient to handle complex |

I am displaying like this- (pic attached) Can someone please help?

As per my understanding it should render into a table?

Upvotes: -1

Views: 198

Answers (1)

Ryan Luu
Ryan Luu

Reputation: 625

Your table is in one line where it is supposed to be multiple lines which is causing it not to render properly. Below I corrected the table to not be in a single line.

| Relational | Non-Relational |
| ---------- | -------------- |
| Standardized | Non-Standardized |
| Vertically Scalable | Horizontally Scalable |
| Fixed Schema | Dynamic Schema |
| ACID | BASE |

Your final table should look like this:

Relational Non-Relational
Standardized Non-Standardized
Vertically Scalable Horizontally Scalable
Fixed Schema Dynamic Schema
ACID BASE

If you would like to learn more about Markdown Tables, I would suggest you check out the Markdown Guide for Tables. In summary:

To add a table, use three or more hyphens (---) to create each column’s header, and use pipes (|) to separate each column. For compatibility, you should also add a pipe on either end of the row.

| Syntax      | Description |
| ----------- | ----------- |
| Header      | Title       |
| Paragraph   | Text        |

You can read the rest of the guide if you would like to know more like alignment or text formatting in tables.

Upvotes: 0

Related Questions