How to Create Tables in HTML

html tables
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HTML Table Example</title>
    <style>
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }

        th, td {
            border: 1px solid #dddddd;
            text-align: left;
            padding: 8px;
        }

        th {
            background-color: #f2f2f2;
        }
    </style>
</head>
<body>

    <h2>HTML Table Example</h2>

    <table>
        <tr>
            <th>Language</th>
            <th>Framework</th>
            <th>Database</th>
        </tr>
        <tr>
            <td>Python</td>
            <td>Django</td>
            <td>Postgres</td>
        </tr>
        <tr>
            <td>Php</td>
            <td>Laravel</td>
            <td>Mysql</td>
        </tr>
        <tr>
            <td>Java</td>
            <td>Spring</td>
            <td>Oracle</td>
        </tr>
    </table>

</body>
</html>

Here is the output.

Leave a Comment

Your email address will not be published. Required fields are marked *