<table>
    <thead>
        <tr>
            <th scope="col">Fruits</th>
            <th scope="col">Weight (kg)</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <th scope="row">Apple</th>
            <td>2</td>
        </tr>
        <tr>
            <th scope="row">Banana</th>
            <td>4</td>
        </tr>
    </tbody>
    <tfoot>
        <tr>
            <th scope="row">Totals</th>
            <td>6</td>
        </tr>
    </tfoot>
</table>
table {

    border-collapse: collapse;
}

thead,
tfoot {
    background: #333;
    color: #fff;
}

tbody {
    background: #fff;
    color: #131C1D;
}


td, th {
    border: 1px solid #131C1D;
    text-align: center;
    padding: 5px 10px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.