I use a HTML table in a README of one of my project. It contains 2 columns and I wanted to know if there was an easy solution to add a link on the first column, and another on the second column without adding an <a>
to each table's cells:
table {
border-collapse: collapse;
}
th,
td {
border: solid lightgrey 1px;
}
tr th:first-of-type,
tr td:first-of-type {
background-color: lightblue;
}
tr th:last-of-type,
tr td:last-of-type {
background-color: lightcoral;
}
<table align="center">
<tr>
<th>a cell</th>
<th>a cell</th>
</tr>
<tr>
<td>a cell</td>
<td>a cell</td>
</tr>
<tr>
<td>a cell</td>
<td>a cell</td>
</tr>
</table>
So that if I click on the blue column it redirects me to A, and if I click on the red column it redirects me to B.
It needed for a README file so it would be great to only use pure HTML.