How to style just one from two identical tables using css and html?

i have two identical tables:

<html>
<head>
    <style>
        td, th {
            text-align: left;
            padding: 28px;
        }
    </style>
</head>
<body>
    <table>
        <tr>
            <th>First Name</th>
            <th>Last Name</th>
        </tr>
        <tr>
            <td>Alex</td>
            <td>Pieter</td>
        </tr>
        <tr>
            <td>Jackson</td>
            <td>Smith</td>
        </tr>
    </table>

    <table>
            <tr>
                <th>First Name</th>
                <th>Last Name</th>
            </tr>
            <tr>
                <td>Alex</td>
                <td>Pieter</td>
            </tr>
            <tr>
                <td>Jackson</td>
                <td>Smith</td>
            </tr>
        </table>

</body>

I added style to td and th tags. How can i style just one table ? I've tried to add class to table:

<table class="myClass">

and add it to styles:

table.myClass, td, th

but it didn't work, i've tried to make it in different ways it's resultless.

1 answer