I wanted to understand, how can I put styles in these table rows, they are generated by the insert cell, so there is no way I can define a css for them, how can I leave a style fixed for it to be generated, such as a larger font size ?
window.onload = function() {
fetch('http://localhost:3000/teste')
.then(response => response.json())
.then(data => {
console.log(data);
var table = document.getElementById('table');
// Primeiro define a variavel, e coloca o comando para inserir uma linha
for (var i = 0; i < 8; i++) {
var row = table.insertRow(i + 1);
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
var cell3 = row.insertCell(2);
var cell4 = row.insertCell(3);
var cell5 = row.insertCell(4);
var cell6 = row.insertCell(5);
var cell7 = row.insertCell(6);
var cell8 = row.insertCell(7);
var cell9 = row.insertCell(8);
var cell10 = row.insertCell(9);
// Aqui chama a variavel e coloca a linha na tabela
cell1.innerHTML = data[i][0];
cell2.innerHTML = data[i][1];
cell3.innerHTML = data[i][2];
cell4.innerHTML = data[i][3];
cell5.innerHTML = data[i][4];
cell6.innerHTML = data[i][5];
cell7.innerHTML = data[i][6];
cell8.innerHTML = data[i][7];
cell9.innerHTML = data[i][8];
cell10.innerHTML = data[i][9];
}
})
}
<table id="table" style="border: 1.5px solid rgb(117, 117, 117);">
<tr style="background-color: rgb(0, 101, 44); font-size: 37px; font-family: Tahoma, Verdana, Segoe, sans-serif; border-bottom: 2px solid rgb(0, 247, 255); color: white;">
<th style="width: 11%;border: 1.5px solid rgb(117, 117, 117);">Data</th>
<th style="width: 8%; border: 1.5px solid rgb(117, 117, 117);">Hora</th>
<th style="width: 5%;border: 1.5px solid rgb(117, 117, 117);">Orig.</th>
<th style="width: 8%;border: 1.5px solid rgb(117, 117, 117);">O.P.</th>
<th style="width: 10%;border: 1.5px solid rgb(117, 117, 117);">Produto</th>
<th style="width: 8%;border: 1.5px solid rgb(117, 117, 117);">Deriv.</th>
<th style="width: 9%;border: 1.5px solid rgb(117, 117, 117);">Peso (TN)</th>
<th style="width: 7%;border: 1.5px solid rgb(117, 117, 117);">Refugo (TN)</th>
<th style="width: 13%;border: 1.5px solid rgb(117, 117, 117);">Lote</th>
<th style="width: 60%;;border: 1.5px solid rgb(117, 117, 117);">Operador</th>
</tr>
</table>