The solutions are probably outdated as the question is 14 years old. But modified 7 days ago? WTF

The solutions are probably outdated as the question is 14 years old. But modified 7 days ago? WTF

I think there should also be a pure CSS solution. But I'd have to look it up.
This should be helpful:
https://www.codeproject.com/Articles/5320138/HTML-Table-Freeze-Row-and-Column-with-CSS