<!-- required files --> <link href="../assets/plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet" /> <link href="../assets/plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css" rel="stylesheet" /> <script src="../assets/plugins/datatables.net/js/dataTables.min.js"></script> <script src="../assets/plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js"></script> <script src="../assets/plugins/datatables.net-responsive/js/dataTables.responsive.min.js"></script> <script src="../assets/plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js"></script> <!-- html --> <table id="data-table-default" width="100%" class="table table-striped table-bordered align-middle text-nowrap"> <thead> <tr> <th width="1%"></th> <th width="1%" data-orderable="false"></th> ... </tr> </thead> <tbody> ... </tbody> </table> <!-- script --> <script> $('#data-table-default').DataTable({ responsive: true }); </script>