Hello!
Why, as a result of this code, all the cells in the table are aligned in one column and don't form a normal table? Sorry for my bad English, and maybe a stupid question, I started learning JS a few days ago
function start () {
var size = document.getElementById('test5').value;
document.getElementById('start').style.display = 'none';
for (var y = 0; y < size; y++) {
document.getElementById("cont").innerHTML += ('<tr>');
for (var x = 0; x < size ; x++) {
document.getElementById("cont").innerHTML += ('<td>test</td>');
}
document.getElementById("cont").innerHTML += ('</tr>');
}
}
<div >
<span id="start"><form action="#">
<p class="range-field">
<input type="range" id="test5" min="3" max="9" value="3"/>
</p>
</form><br>
<button type="button" onclick="start()">start</button></span>
<table border="1" id="cont"></table>
</div>