I am currently learning about tables in Bootstrap 4. I am facing an issue where the background-color in the table-light class is not being applied. I suspect this might be due to the thead-dark class taking precedence over it. Could you please clarify why thead-dark takes priority over table-light? If my assumption is incorrect, I would appreciate an explanation regarding the actual reason.
<!DOCTYPE html>
<html lang="en>
<head>
<meta charset="UTF-8>
<meta name="viewport" content="width=device-width, initial-scale=1>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link href="https://use.fontawesome.com/releases/v5.0.6/css/all.css" rel="stylesheet">
<title>Table</title>
</head>
<body>
<div class="container">
<h2>Contextual Classes</h2>
<p>Contextual classes can be used to color the table, table rows or table cells. The classes that can be used are: .table-primary, .table-success, .table-info, .table-warning, .table-danger, .table-active, .table-secondary, .table-light and .table-dark:</p>
<table class="table">
<thead class="thead-dark">
<tr>
<th class="table-light">Firstname</th>
<th>Lastname</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<tr>
<td>Default</td>
<td>Defaultson</td>
<td><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7115141731021e1c141c10181d5f121e1c">[email protected]</a></td>
</tr>
<tr class="table-primary">
<td>Primary</td>
<td>Joe</td>
<td><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="87ede8e2c7e2ffe6eaf7ebe2a9e4e8ea">[email protected]</a></td>
</tr>
<tr class="table-success">
<td>Success</td>
<td>Doe</td>
<td><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d9b3b6b1b799bca1b8b4a9b5bcf7bab6b4">[email protected]</a></td>
</tr>
<tr class="table-danger">
<td>Danger</td>
<td>Moe</td>
<td><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="167b77646f56736e777b667a733875797b">[email protected]</a></td>
</tr>
<tr class="table-info">
<td>Info</td>
<td>Dooley</td>
<td><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b7ddc2dbcef7d2cfd6dac7dbd299d4d8da">[email protected]</a></td>
</tr>
<tr class="table-warning">
<td>Warning</td>
<td>Refs</td>
<td><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e3818ca3869b828e938f86cd808c8e">[email protected]</a></td>
</tr>
<tr class="table-active">
<td>Active</td>
<td>Activeson</td>
<td><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="afceccdbefcad7cec2dfc3ca81ccc0c2">[email protected]</a></td>
</tr>
<tr class="table-secondary">
<td>Secondary</td>
<td>Secondson</td>
<td><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3b485e587b5e435a564b575e15585456">[email protected]</a></td>
</tr>
<tr class="table-light">
<td>Light</td>
<td>Angie</td>
<td><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ec8d828b8589ac89948d819c8089c28f8381">[email protected]</a></td>
</tr>
<tr class="table-dark text-dark">
<td>Dark</td>
<td>Bo</td>
<td><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a6c4c9e6c3dec7cbd6cac388c5c9cb">[email protected]</a></td>
</tr>
</tbody>
</table>
</div>
</body> <!-- source: https://www.w3schools.com/bootstrap4/bootstrap_tables.asp -->
Issue: