Am trying to display query contents in HTMl using following jquery
$tableSearch = $('#table-search');
$tableSearch.html('<tr><th>Name</th><tr><th>Hours</tr></th><tr><th>MB</th></tr>');
result.forEach(function(row) {
$('#table-search tr').append('<td>'+ row.Date +'</td>'+'<td>'+ row.Hours+'</td>'+'<td>'+ row.MB+'</td>');
});
But it gives the result like below
Actually I want the result like this

How to format those values like above.

[<>]snippet editor and post a minimal reproducible example with relevant input<tr><th>Name</th><tr><th>Hours</tr></th><tr><th>MB</th></tr>will give you a vertical header on its own