Linking from a Table Cell ( In HTML, it's possible to create hyperlinks from text within table cells. However, creating a link that spans the entire cell can be challenging. To link the entire Preferred Method: Example: Note: This method is not semantically correct since is meant to be an inline element. However, it works in most browsers. Alternative (Not Advised): For Internet Explorer only, violate the HTML standard by directly linking the Example: Caution: This method is ill-advised because it's non-standard and will not work in other browsers. The above is the detailed content of How to Create a Link From an Entire HTML Table Cell?. For more information, please follow other related articles on the PHP Chinese website!)
cell without JavaScript:
<td>
<a href="http://example.com">
<div>
element.
<table border="1">
<tr>
<a href="http://example.com"><td width="200">Hello world</td></a>
</tr>
</table>