center-Tabelle in HTML

Wie kann ich den center der table innerhalb einer div mit html?

Ich legte meine Inhalte in einer div - tag, und legen Sie die text-align Attribut center wie die folgenden.

text-align: center;

Das hat nicht funktioniert.

Unten ist mein html.

<html>
    <body>
        <div style="text-align:center">
            <p>
    text test
            </p>
            <table border="1">
                <tr>
                    <td>100</td>
                    <td>200</td>
                    <td>300</td>
                </tr>
                <tr>
                    <td>400</td>
                    <td>500</td>
                    <td>600</td>
                </tr>
            </table>
        </div>
    </body>
</html>
InformationsquelleAutor R.S | 2012-11-20
Schreibe einen Kommentar