School Time Table
| Day |
9:00–10:00 |
10:00–11:00 |
11:00–12:00 |
12:00–1:00 |
2:00–3:00 |
| Monday |
Math |
English |
Science |
Lunch |
Computer |
| Tuesday |
Science |
Math |
English |
Lunch |
Sports |
| Wednesday |
English |
Computer |
Math |
Lunch |
Science |
| Thursday |
Math |
Science |
Computer |
Lunch |
English |
| Friday |
Computer |
English |
Math |
Lunch |
Activity |
<pre><code>
<h2 style="text-align:center;">School Time Table</h2>
<table style="width:100%; border-collapse:collapse; text-align:center; font-family:Arial;">
<tr style="background-color:#2c3e50; color:white;">
<th style="border:1px solid #ccc; padding:8px;">Day</th>
<th style="border:1px solid #ccc; padding:8px;">9:00–10:00</th>
<th style="border:1px solid #ccc; padding:8px;">10:00–11:00</th>
<th style="border:1px solid #ccc; padding:8px;">11:00–12:00</th>
<th style="border:1px solid #ccc; padding:8px;">12:00–1:00</th>
<th style="border:1px solid #ccc; padding:8px;">2:00–3:00</th>
</tr>
<tr>
<td style="border:1px solid #ccc; padding:8px;">Monday</td>
<td style="border:1px solid #ccc; padding:8px;">Math</td>
<td style="border:1px solid #ccc; padding:8px;">English</td>
<td style="border:1px solid #ccc; padding:8px;">Science</td>
<td style="border:1px solid #ccc; padding:8px;">Lunch</td>
<td style="border:1px solid #ccc; padding:8px;">Computer</td>
</tr>
<tr>
<td style="border:1px solid #ccc; padding:8px;">Tuesday</td>
<td style="border:1px solid #ccc; padding:8px;">Science</td>
<td style="border:1px solid #ccc; padding:8px;">Math</td>
<td style="border:1px solid #ccc; padding:8px;">English</td>
<td style="border:1px solid #ccc; padding:8px;">Lunch</td>
<td style="border:1px solid #ccc; padding:8px;">Sports</td>
</tr>
<tr>
<td style="border:1px solid #ccc; padding:8px;">Wednesday</td>
<td style="border:1px solid #ccc; padding:8px;">English</td>
<td style="border:1px solid #ccc; padding:8px;">Computer</td>
<td style="border:1px solid #ccc; padding:8px;">Math</td>
<td style="border:1px solid #ccc; padding:8px;">Lunch</td>
<td style="border:1px solid #ccc; padding:8px;">Science</td>
</tr>
<tr>
<td style="border:1px solid #ccc; padding:8px;">Thursday</td>
<td style="border:1px solid #ccc; padding:8px;">Math</td>
<td style="border:1px solid #ccc; padding:8px;">Science</td>
<td style="border:1px solid #ccc; padding:8px;">Computer</td>
<td style="border:1px solid #ccc; padding:8px;">Lunch</td>
<td style="border:1px solid #ccc; padding:8px;">English</td>
</tr>
<tr>
<td style="border:1px solid #ccc; padding:8px;">Friday</td>
<td style="border:1px solid #ccc; padding:8px;">Computer</td>
<td style="border:1px solid #ccc; padding:8px;">English</td>
<td style="border:1px solid #ccc; padding:8px;">Math</td>
<td style="border:1px solid #ccc; padding:8px;">Lunch</td>
<td style="border:1px solid #ccc; padding:8px;">Activity</td>
</tr>
</table>
</code></pre>
Introduction
HTML tables are used to organize data into rows and columns. They are commonly used in websites to display structured information such as schedules, price lists, reports, and timetables. One practical example of using tables in HTML is creating a school time table.
In this tutorial, you will learn how to create a simple and clear school time table using HTML table tags. This example is useful for beginners who want to understand how rows, columns, headings, and table styling work in HTML.
What is an HTML Table
An HTML table is created using the <table> tag. Inside the table, rows are created using <tr>, header cells using <th>, and normal cells using <td>.
Basic structure:
Tables help display data in a structured grid format.
The timetable is created using the HTML <table> element. The first row uses <th> tags to define column headings such as time slots. Each following row represents a day of the week using <td> cells.
Inline CSS styling is applied to:
This makes the timetable clear and readable.
Where HTML Tables Are Used
HTML tables are used in many real-world web pages:
Learning tables is essential for web design basics.
Conclusion
Creating a school time table in HTML is a simple and practical way to understand how tables work. By using <table>, <tr>, <th>, and <td> tags, you can organize information into a structured layout. This example shows how rows and columns combine to display a weekly schedule clearly.
Practicing HTML tables helps beginners build strong foundations in web development and page layout design.
No comments:
Post a Comment