Home / Programs / Write HTML code for this table
Programming Example

Write HTML code for this table

👁 634 Views
💻 Practical Program
📘 Step by Step Learning
Write HTML code for this table
Write HTML code for this table
This image is related to the program topic and helps make the concept easier to understand.

Program Code

<!DOCTYPE html>
<html>
    <head>
        <title>Practice</title>
    </head>
    <body>
        <table border="1" cellpadding="10" cellspacing="0">
            <tr>
                <td rowspan="2">Student Name</td>
                <td rowspan="2">Course</td>
                <td colspan="2" align="center">Hours</td>
            </tr>
            <tr>
                <td>Credit</td>
                <td>Contact</td>
            </tr>
            <tr>
                <td>Adam</td>
                <td>Programming</td>
                <td>4</td>
                <td>5</td>
            </tr>
            <tr>
                <td>Harry</td>
                <td>ITC</td>
                <td>4</td>
                <td>5</td>
            </tr>
            <tr>
                <td>Jill</td>
                <td>English</td>
                <td>3</td>
                <td>3</td>
            </tr>
            <tr>
                <td>Tom</td>
                <td>Math</td>
                <td>3</td>
                <td>3</td>
            </tr>
        </table>
    </body>
</html>

Output

no

Explanation

no

How to learn from this program

First read the algorithm, then study the program code line by line. After that, compare the code with the output and finally go through the explanation. This approach helps learners understand both the logic and the implementation properly.