1.A class timetable
BeginnerBuild a table with the caption "Monday timetable", a header row with Time and Subject, and three rows: 9:00 Maths, 10:00 Science, 11:00 English. Use header cells correctly and add simple borders with a style element.
Show hint
<caption> must be first inside <table>. Use <th> for headings and border-collapse: collapse for single borders.
Show solution
<style>
table { border-collapse: collapse; }
th, td { border: 1px solid #999; padding: 6px 12px; }
</style>
<table>
<caption>Monday timetable</caption>
<thead>
<tr><th scope="col">Time</th><th scope="col">Subject</th></tr>
</thead>
<tbody>
<tr><td>9:00</td><td>Maths</td></tr>
<tr><td>10:00</td><td>Science</td></tr>
<tr><td>11:00</td><td>English</td></tr>
</tbody>
</table>