Write a program to demonstrate the weekly class Time Table using HTML table tag.

1
2
3
    <html>
4
    <head>
5
        <title> tables </title>
6
    </head>
7
    <body>
8
        <table border="4" width="100%">
9
            <tr>
10
                <th colspan="7"> Time Table </th>
11
            </tr>
12
            <tr>
13
                <th colspan="7"> HOURS </th>
14
            </tr>
15
            <tr>
16
                <Th> DAYS </th>
17
                <th> 9:00 </th>
18
                <th> 10:00 </th>
19
                <th> 11:00 </th>
20
                <th> 12:00 </th>
21
                <th> 01:00 </th>
22
            </tr>
23
            <tr>
24
                <th> Mon </th>
25
                <td> C LANG </td>
26
                <td> DIGITAL CIRCUIT </td>
27
                <td> SOFT ENGINEERING</td>
28
                <td> DISCRETE MATH </td>
29
                <td> WEB TECH </td>
30
            </tr>
31
            <tr>
32
                <th> Tus </th>
33
                <td> C LANG </td>
34
                <td> DIGITAL CIRCUIT </td>
35
                <td> SOFT ENGINEERING</td>
36
                <td> DISCRETE MATH </td>
37
                <td> WEB TECH </td>
38
            </tr>
39
            <tr>
40
                <th> Wed </th>
41
                <td> C LANG </td>
42
                <td> DIGITAL CIRCUIT </td>
43
                <td> SOFT ENGINEERING</td>
44
                <td> DISCRETE MATH </td>
45
                <td> WEB TECH </td>
46
            </tr>
47
            <tr>
48
                <th> Thr </th>
49
                <td> C LANG </td>
50
                <td> DIGITAL CIRCUIT </td>
51
                <td> SOFT ENGINEERING</td>
52
                <td> DISCRETE MATH </td>
53
                <td> WEB TECH </td>
54
            </tr>
55
            <tr>
56
                <th> Fri </th>
57
                <td> C LANG </td>
58
                <td> DIGITAL CIRCUIT </td>
59
                <td> SOFT ENGINEERING</td>
60
                <td> DISCRETE MATH </td>
61
                <td> WEB TECH </td>
62
            </tr>
63
            </tr>
64
        </table>
65
    </body>
66
    </html>
67
    

Output

1
2
        No Output Available
3
        

Rate the Code

Reviews are published after a quick safety check (usually within 24 hours).

Reviews are public. Developers can see basic device specifications to respond. Learn more

Core Concept of Weekly Class Timetable Using HTML Table

To show structured data in rows and columns, the table element is used. With the help of different HTML elements, a weekly college or university timetable is defined from Monday to Friday.

This program contains

  • <table>: It defines the table boundary with border=”4” and width =”100%”
  • <tr> (Table Row): Makes a new row for the table.
  • <th> (Table Header): Used to define the table heading.
  • <td>: Represents a cell of the table. The content is defined inside this tag.
  • Colspan: To merge the columns of a row, like the heading of hours is merged with the 7 columns.

Why is it used?

  • To show complex data, schedules, or statistics in a grid or tabular format.

Real-life Applications

  • Dashboards & Reports: To show financial reports, employee attendance sheets, or product price lists in an organized way.
  • In Government portals or e-commerce websites: Everyone downloads the PDF receipt of any bill from any government bill or e-commerce bill invoice then the format is made with a table in most of the cases.

Key Benefits of this Program

  • Data Organization: Very big data can be easily shown with the help of tables in an organized manner.
  • Merging is easy: With colspan and rowspan, merging cells horizontally or vertically is very easy.
License: This program's source code is open-sourced under the MIT License, while the rest of the program's text content and overall dhimanp platform and brand content remain proprietary under dhimanp.

Submit your modified code

Your submissions are published after a quick safety check (usually within 7 days).

Submissions are public. Developers can see basic device specifications to respond. Learn more

Disclaimer

The information that you shared with us will be publicly visible, and everyone can see your information. And we (dhimanp) are not responsible if anyone misuses this information. We can remove any submitted code at any time for better transparency.

Privacy Policy

If you share your data with us by submitting your code for credit, then we may show your full name, school or college name, and city name on our website.

We are not using this data to track you and are not selling this data to anyone.

If you want to remove your name from our website, you can contact us, and we will remove your name from our website. In the removal process, full credit, including your full name, school or college, city, and code, will be removed from our website.