9 Program to demonstrate tables in HTML

Program:

<!DOCTYPE html>

<html lang="en">



<head>

    <meta charset="UTF-8">

    <title>HTML Table TAG</title>

    <style>

        body {

            font-family: Arial, sans-serif;

        }

    </style>

</head>



<body>



    <!-- Simple Table -->

    <h3> Simple Table </h3>

    <table border="10">

        <th> Data 1 </th>

        <th> Value </th>

        <tr>

            <td> Website: </td>

            <td> CodingAtharva </td>

        </tr>

        <tr>

            <td> Instagram </td>

            <td> @theatharvagrawal </td>

        </tr>

    </table>



    <!-- Table with Col Span -->

    <h3> Table with Coll Span </h3>

    <table border="3">

        <tr>

            <th> Data 1 </th>

            <th> Value </th>

        </tr>

        <tr>

            <td colspan="2"> Website: </td>

            <td> CodingAtharva </td>

        </tr>

        <tr>

            <td> Instagram </td>

            <td> @theatharvagrawal </td>



        </tr>

    </table>



    <!-- Table With Row Span -->

    <h3> Table With Row Span </h3>

    <table border="3">

        <th> Data 1 </th>

        <th> Value </th>

        <tr>

            <td rowspan="2"> Website: </td>

            <td> CodingAtharva </td>

        </tr>

        <tr>

            <td> GeeksforGeeks </td>

            <td> IG: @theatharvagrawal </td>

        </tr>

    </table>



    <!-- Custom Table with CSS -->

    <h3> Custom Table with CSS </h3>

    <table collspan="1" style=" border: 1px solid black;">

        <th> Data 1 </th>

        <th> Value </th>

        <tr>

            <td> Website: </td>

            <td> CodingAtharva </td>

        </tr>

        <tr>

            <td> Instagram </td>

            <td> @theatharvagrawal </td>

        </tr>

    </table>



</body>



</html>


Output:
 tables in HTML

Previous
Next Post »

1 Comments:

Click here for Comments
July 22, 2020 at 10:23 PM ×

how did you do all this website styling in blogger

Thank You Bayyaram harsha For Comment.
Reply
avatar