Prog-2
Prog-2
html” to display
your class timetable.
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible"
content="IE=edge">
<meta name="viewport" content="width=device-
width, initial-scale=1.0">
<title>Time Table</title>
<style>
/* Step 1: CSS styles to format the table */
body {
font-family: Arial, sans-serif;
}
table {
width: 80%;
margin: 20px auto;
border-collapse: collapse;
}
th, td {
padding: 15px;
text-align: center;
border: 1px solid #000;
}
th {
background-color: #f4b41a;
}
tfoot td {
background-color: #f4b41a;
font-weight: bold;
}
.lab-hour {
background-color: #a2d5f2;
}
.elective-hour {
background-color: #c3f584;
}
tbody tr:nth-child(even) {
background-color: #f2f2f2;
}
tbody tr:nth-child(odd) {
background-color: #e6e6e6;
}
</style>
</head>
<body>
<table>
<!-- Step 2: Create the Table Structure -->
<thead>
<tr>
<th>Time/Day</th>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
</tr>
</thead>
<tr>
<td>11:00 - 11:15</td>
<td colspan="5">Tea Break</td>
</tr>
<tr>
<td>11:15 - 12:15</td>
<td rowspan="2" class="lab-hour">Mini Project</td>
<td>Research Methodology</td>
<td>Artificial Intelligence</td>
<td>Theory of Computation</td>
<td class="elective-hour">Elective</td>
</tr>
<tr>
<td>12:15 - 1:15</td>
<td>Computer Networks</td>
<td>Theory of Computation</td>
<td>Artificial Intelligence</td>
<td>NSS</td>
</tr>
<tr>
<td>1:15 - 2:00</td>
<td colspan="5">Lunch Break</td>
</tr>
<tr>
<td>2:00 - 3:00</td>
<td>Artificial Intelligence</td>
<td>Theory of Computation</td>
<td class="lab-hour">Yoga</td>
<td>Artificial Intelligence</td>
<td class="elective-hour">Elective</td>
</tr>
<tr>
<td>3:00 - 4:00</td>
<td>Physical Education</td>
<td>Environmental Studies</td>
<td>NSS</td>
<td>Yoga</td>
<td>Tutorial</td>
</tr>
</tbody>
</body>
</html>