Course Content
Bootstrap 5 Alerts
0/1
Bootstrap
About Lesson

In Bootstrap 5, tables can be easily styled using the built-in table classes. Here’s a basic example of how to create a table in Bootstrap 5:

Example:

HTML
 <div class="container">
        <h2>Bootstrap 5 Table Example</h2>
        <table class="table">
            
            <thead>
                <tr>
                    <th scope="col">Name</th>
                    <th scope="col">Lastname</th>
                    <th scope="col">Email</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <th scope="row">John </th>
                    <td>Doe</td>
                    <td>john@example.com</td>
                </tr>
                <tr>
                    <th scope="row">Jane</th>
                    <td>Smith</td>
                    <td>jane@example.com</td>
                </tr>
            </tbody>
        </table>
    </div>

Output: