JSFiddle - React, Tailwind, and code Playground

HTML

<form id="myform">
<table>
 <tr>
  <td>some text</td>
  <td>some text</td>
  <td>some text</td>
</tr>
 <tr>
  <td>some text</td>
  <td>some text</td>
  <td>some text</td>
</tr>
</table>
</form>

CSS

div {
    width: 70px;
    height: 20px;
    background-color: black;
    color: red;
    top: 650px;
}

JavaScript

$(function(){
    $('#myform').find('table').each(function(i,e){
       var $table = $(e);
       
       $table.attr('id', 'table' + (parseInt($table.index(),10)+1));
 
       $table.find('tr').each(function(i2,e2){
          var $tr = $(e2);

          $tr.find('td').each(function(i3, e3){
             var $td = $(e3);
             
             $td.addClass('td' + (parseInt($td.index(),10)+1));
          });
       });
    });
});