HTML Tables

HTML
<table border="1" cellpadding="6" style="border-collapse: collapse">
    <caption>Semester Results</caption>
    <thead>
        <tr><th>Roll</th><th>Name</th><th>Marks</th></tr>
    </thead>
    <tbody>
        <tr><td>1</td><td>Asha</td><td>88</td></tr>
        <tr><td>2</td><td>Ravi</td><td>76</td></tr>
    </tbody>
    <tfoot>
        <tr><td colspan="2">Average</td><td>82</td></tr>
    </tfoot>
</table>
Semester Results
RollNameMarks
1Asha88
2Ravi76
Average82
Tag / attributeMeaning
<tr>Table row
<th> / <td>Header cell / data cell
<thead>, <tbody>, <tfoot>Group rows into sections
colspan / rowspanMerge cells across columns / rows

rowspan Example

HTML
<table border="1" cellpadding="6" style="border-collapse: collapse">
    <tr><th>Day</th><th>Time</th><th>Subject</th></tr>
    <tr><td rowspan="2">Monday</td><td>10:00</td><td>TOC</td></tr>
    <tr><td>11:00</td><td>DBMS</td></tr>
</table>
DayTimeSubject
Monday10:00TOC
11:00DBMS
Track your progress through the HTML course