html fixed table header when scrolling code example
Example 1: table fixed header
.tableFixHead thead th { position: sticky; top: 0; }
Example 2: html table scrollable body fixed header
/*Simply*/ position:sticky; top: 0; /*your th elements*/
.tableFixHead thead th { position: sticky; top: 0; }
/*Simply*/ position:sticky; top: 0; /*your th elements*/