What are the potential issues with using outdated HTML attributes like 'border' in table creation?

Using outdated HTML attributes like 'border' in table creation can lead to non-compliance with modern web standards and decreased accessibility for users. To solve this issue, it is recommended to use CSS for styling instead of relying on HTML attributes.

<!DOCTYPE html>
<html>
<head>
    <style>
        table {
            border-collapse: collapse;
            width: 100%;
        }
        th, td {
            border: 1px solid black;
            padding: 8px;
            text-align: left;
        }
    </style>
</head>
<body>

<table>
    <tr>
        <th>Header 1</th>
        <th>Header 2</th>
    </tr>
    <tr>
        <td>Data 1</td>
        <td>Data 2</td>
    </tr>
</table>

</body>
</html>