Dynamic sorting approach
I have a sorting CSS + JS lying around since 2016-ish. In case you want to do that...
Add this to html <head>
<style type="text/css">
table{
border-collapse:collapse;
border:1px solid #FF0000;
}
table td , th{
border:1px solid #FF0000;
}
table.sortable thead {
background-color:#eee;
color:#666666;
font-weight: bold;
cursor: default;
}
</style>
<script src="sorttable.js"></script>
And install https://kryogenix.org/code/browser/sorttable/sorttable.js