How to create a rounded table in Bootstrap 5?
Last Updated :
26 Jun, 2025
Bootstrap 5 provides various classes that can be used for styling the tables such as changing the heading appearance, making the rows striped, adding or removing borders, making rows hoverable, etc. In this article, we will learn How to create a rounded table in Bootstrap 5.
Here we use two different approaches rounded-3 and rounded-pill. these are two different classes in Bootstrap for giving styles to the table.
Approach 1 Using rounded-3
To create a rounded table with rounded-3, you need to ensure that the table itself has a border radius, and the table's borders do not override the effect.
Syntax
<table class="table table-sm table-bordered bg-success text-light rounded-3">
Example: In this example we create a rounded table in Bootstrap 5 using rounded class
HTML
<html>
<head>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<style>
.table-rounded {
border-radius: 1rem;
overflow: hidden;
}
</style>
</head>
<body class="m-3">
<center>
<h2 class="text-success">
GeeksforGeeks
</h2>
<h2>How to create a rounded table in Bootstrap 5?</h2>
</center>
<table class="table table-sm table-bordered bg-success text-light table-rounded">
<thead>
<tr>
<th scope="col">No</th>
<th scope="col">Course</th>
<th scope="col">Price</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>HTML- Basics</td>
<td>$29</td>
</tr>
<tr>
<th scope="row">2</th>
<td>CSS- Basics</td>
<td>$25</td>
</tr>
<tr>
<th scope="row">3</th>
<td>JS- Basics</td>
<td>$35</td>
</tr>
</tbody>
</table>
</body>
</html>
Output
Approach 2: Using Rounded-pill
- We can make a rounded table using rounded-pill class in Bootstrap-5 which has a border radius of 50%.
- Give different styling by using different Bootstrap classes.
Syntax:
<table class="table table-sm table-bordered bg-danger text-light rounded-pill" >
Example: In this example we will see how to create a rounded table in Bootstrap 5
HTML
<!DOCTYPE html>
<html>
<head>
<link href=
"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet" integrity=
"sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous">
</head>
<body class="m-3">
<center>
<h2 class="text-success">
GeeksforGeeks
</h2>
<h2>How to create a rounded table in Bootstrap 5? </h2>
</center>
<table class="table table-sm table-bordered
bg-danger text-light rounded-pill">
<thead>
<tr style="text-align: center;">
<th scope="col">No</th>
<th scope="col">Course</th>
<th scope="col">Price</th>
</tr>
</thead>
<tbody>
<tr style="text-align: center;">
<th scope="row">1</th>
<td>HTML- Basics</td>
<td>$29</td>
</tr>
<tr style="text-align: center;">
<th scope="row">2</th>
<td>CSS- Basics</td>
<td>$25</td>
</tr>
<tr style="text-align: center;">
<th scope="row">3</th>
<td>JS- Basics</td>
<td>$35</td>
</tr>
</tbody>
</table>
</body>
</html>
Output:

Similar Reads
How to Create a Responsive Table in Bootstrap ? A responsive table in Bootstrap adjusts its layout to fit different screen sizes, ensuring readability and usability on all devices. It typically involves using classes like .table-responsive or custom CSS to enable horizontal scrolling on smaller screens.Table of Content Using the table-responsive
4 min read
How to Create a Pricing Table in Bootstrap? Pricing tables are essential for showcasing different pricing plans or subscription options for products or services to the user. With the help of the pricing tables plans users can avail their plans accordingly. We will focus on the steps to create a pricing table in Bootstrap. ApproachFirst, creat
3 min read
How to create Hoverable Table Rows in Bootstrap 5 ? This feature is particularly useful in web applications, dashboards, or scenarios where tabular data is presented, improving the overall user experience and interface. To achieve the effect of hoverable table rows we use the bootstrap class "table-hover" in the <table> tag. This effect enhance
2 min read
How to Create a Rounded Card in Tailwind CSS ? A rounded card is a design used in web development, featuring rounded corners and typically containing content or information within a defined boundary. To create a rounded card in Tailwind CSS, use the rounded utility class along with the bg-white and shadow-md classes for a clean, rounded look. Sy
2 min read
How to change font size of Table Content in Bootstrap 5? Bootstrap 5 has simple and flexible framework features to build responsive web applications. For changing the font size of table content, we can use Utility Classes or the Typography Class which allows us to adjust the font sizes according to the requirement. In this article, we will explore both ap
3 min read