<!
DOCTYPE html>
<html>
<head>
<title>Colspan and Rowspan Example</title>
<style>
table,
th,
td {
border: 1px solid black;
border-collapse: collapse;
padding: 8px;
text-align: center;
}
</style>
</head>
<body>
<!-- table for ROWspan -->
<h2>Rowspan Example</h2>
<table>
<caption> Table 1: Row-Span</caption>
<tr>
<th rowspan="2">Day</th>
<th>Subject</th>
</tr>
<tr>
<th>Teacher</th>
</tr>
<tr>
<td rowspan="2">Monday</td>
<td>Math</td>
</tr>
<tr>
<td>Mr. Sharma</td>
</tr>
</table>
<!-- TABLE FOR colspan -->
<h2> Colspan </h2>
<table>
<tr>
<th colspan="3">Student Information</th>
</tr>
<tr>
<th>Name</th>
<th>Age</th>
<th>Class</th>
</tr>
<tr>
<td>Rahul</td>
<td>20</td>
<td>[Link]</td>
</tr>
<caption> Table 2: Col-Span</caption>
</table>
<!-- Combination of Rowspan and Colspan -->
<!-- table 1 -->
<h2>Timetable Example</h2>
<table>
<tr>
<th>Day</th>
<th colspan="2">Morning</th>
<th colspan="2">Afternoon</th>
</tr>
<tr>
<td rowspan="2">Monday</td>
<td>9–10 AM</td>
<td>Math</td>
<td>1–2 PM</td>
<td>Science</td>
</tr>
<tr>
<!-- Day cell is merged vertically using rowspan -->
<td>10–11 AM</td>
<td>English</td>
<td colspan="2">Sports</td>
</tr>
</table>
<!-- Table 2 -->
<h2>Student Marks Table</h2>
<table>
<tr>
<th rowspan="2">Student Name</th>
<th colspan="2">Math</th>
<th colspan="2">Science</th>
<th colspan="2">English</th>
</tr>
<tr>
<th>Obtained</th>
<th>Total</th>
<th>Obtained</th>
<th>Total</th>
<th>Obtained</th>
<th>Total</th>
</tr>
<tr>
<td>Rahul</td>
<td>45</td>
<td>50</td>
<td>40</td>
<td>50</td>
<td>42</td>
<td>50</td>
</tr>
<tr>
<td>Priya</td>
<td>48</td>
<td>50</td>
<td>43</td>
<td>50</td>
<td>45</td>
<td>50</td>
</tr>
</table>
</body>
</html>