Open In App

What is use of the table-striped Class in Bootstrap ?

Last Updated : 19 Feb, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

The .table-striped class in Bootstrap is utilized to add alternating background colors to the rows of a table, improving readability and visual distinction between adjacent rows of tabular data. The rows look zebra-striped and it helps to differentiate between two rows of a table.

Preview

Syntax

<table class="table table-striped">
<!-- Table content goes here -->
</table>

Explanation: When applied to a <table> element along with the .table class, .table-striped adds a background colour to every other row of the table, creating a striped pattern. This enhances the visual appeal of the table and makes it easier for users to differentiate between rows of data.

Ref: https://www.geeksforgeeks.org/bootstrap-5-table-striped-rows/


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads