Styling Tables for Readability in CSS


Improve table readability with alternating row colors and border styling.

Source Code

table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 8px;
    border: 1px solid #ddd;
}
tr:nth-child(even) {
    background-color: #f2f2f2;
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments