HTML Table colspan Attribute

Free Web development courses with real-time projects Start Now!!

Program 1

<html>
    <body>
        <table border="2">
            <tr>
                <th colspan="2">Name</th>
                <th>Age</th>
                <th colspan="2">Course</th>
            </tr>
            <tr>
                <td>Ninja</td>
                <td>1</td>
                <td>20</td>
                <td>C++</td>
                <td>Python</td>
            </tr>
            <tr>
                <td>Ninja</td>
                <td>2</td>
                <td>31</td>
                <td colspan="2">Java</td>
            </tr>
            <tr>
                <td>Ninja</td>
                <td>3</td>
                <td>29</td>
                <td>Javascript</td>
                <td>R</td>
            </tr>
        </table>
    </body>
    </html>

 

Did you like our efforts? If Yes, please give DataFlair 5 Stars on Google

courses

DataFlair Team

DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.

Leave a Reply

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