JSFiddle - React, Tailwind, and code Playground

by WILLIAM CORREA

HTML

<table>
  <tr>
    <td>A</td>
    <td>B</td>
  </tr>
  <tr>
    <td><a href="https://google.com"></a></td>
    <td><a href="https://phpzm.rocks"></a></td>
  </tr>
</table>

JavaScript

const a = document.querySelector('table tr:nth-child(2) td:nth-child(2) a')
console.log('~> a', a.href)
alert(a.href)