--- layout: post title: displaying beautiful tables with Bootstrap Tables date: 2023-03-20 14:37:00-0400 description: an example of how to use Bootstrap Tables tags: formatting tables categories: sample-posts giscus_comments: true related_posts: true pretty_table: true --- Using markdown to display tables is easy. Just use the following syntax: ```markdown | Left aligned | Center aligned | Right aligned | | :----------- | :------------: | ------------: | | Left 1 | center 1 | right 1 | | Left 2 | center 2 | right 2 | | Left 3 | center 3 | right 3 | ``` That will generate: | Left aligned | Center aligned | Right aligned | | :----------- | :------------: | ------------: | | Left 1 | center 1 | right 1 | | Left 2 | center 2 | right 2 | | Left 3 | center 3 | right 3 |

It is also possible to use HTML to display tables. For example, the following HTML code will display a table with [Bootstrap Table](https://bootstrap-table.com/), loaded from a JSON file: {% raw %} ```html
ID Item Name Item Price
``` {% endraw %}
ID Item Name Item Price

By using [Bootstrap Table](https://bootstrap-table.com/) it is possible to create pretty complex tables, with pagination, search, and more. For example, the following HTML code will display a table, loaded from a JSON file, with pagination, search, checkboxes, and header/content alignment. For more information, check the [documentation](https://examples.bootstrap-table.com/index.html). {% raw %} ```html
ID Item Name Item Price
``` {% endraw %}
ID Item Name Item Price