Use that row under ‘thead’ tag. Thead tag is used for giving heading to the table. So when you scroll your table, heading part remains visible always.
Like :-
<table>
<thead>
<tr><td>name</td> <td>id</td></tr>
</thead>
<tr><td>ram</td> <td>2</td></tr>
</table>
Rest upon you how you design using css.