How to Create Time-Table schedule using HTML ?

10 May, 2022
A Table is an arrangement of rows and columns. Anyone can create a table by knowing the basics of HTML(HyperText Markup Language). A table is defined by using <table> tag in HTML.
Steps to Create a Table:
Create a <html> tag.Create a table using the tags <table></table>.Create rows in the table using <tr>This is the row tag</tr>.Insert the data into rows using <td> Table Data</td> tags.Close the table tag. Close the html tag </html>.
Create a <html> tag.
Create a table using the tags <table></table>.
Create rows in the table using <tr>This is the row tag</tr>.
Insert the data into rows using <td> Table Data</td> tags.
Close the table tag. 
Close the html tag </html>.
This is the basic Time table created in HTML without the usage of font color and background colors.
Example: 
html
<!DOCTYPE html><html> <body>    <h1>TIME TABLE</h1>    <table border="5" cellspacing="0" align="center">        <!--<caption>Timetable</caption>-->        <tr>            <td align="center" height="50"                width="100"><br>                <b>Day/Period</b></br>            </td>            <td align="center" height="50"                width="100">                <b>I<br>9:30-10:20</b>            </td>            <td align="center" height="50"                width="100">                <b>II<br>10:20-11:10</b>            </td>            <td align="center" height="50"                width="100">                <b>III<br>11:10-12:00</b>            </td>            <td align="center" height="50"                width="100">                <b>12:00-12:40</b>            </td>            <td align="center" height="50"                width="100">                <b>IV<br>12:40-1:30</b>            </td>            <td align="center" height="50"                width="100">                <b>V<br>1:30-2:20</b>            </td>            <td align="center" height="50"                width="100">                <b>VI<br>2:20-3:10</b>            </td>            <td align="center" height="50"                width="100">                <b>VII<br>3:10-4:00</b>            </td>        </tr>        <tr>            <td align="center" height="50">                <b>Monday</b></td>            <td align="center" height="50">Eng</td>            <td align="center" height="50">Mat</td>            <td align="center" height="50">Che</td>            <td rowspan="6" align="center" height="50">                <h2>L<br>U<br>N<br>C<br>H</h2>            </td>            <td colspan="3" align="center"                height="50">LAB</td>            <td align="center" height="50">Phy</td>        </tr>        <tr>            <td align="center" height="50">                <b>Tuesday</b>            </td>            <td colspan="3" align="center"                height="50">LAB            </td>            <td align="center" height="50">Eng</td>            <td align="center" height="50">Che</td>            <td align="center" height="50">Mat</td>            <td align="center" height="50">SPORTS</td>        </tr>        <tr>            <td align="center" height="50">                <b>Wednesday</b>            </td>            <td align="center" height="50">Mat</td>            <td align="center" height="50">phy</td>            <td align="center" height="50">Eng</td>            <td align="center" height="50">Che</td>            <td colspan="3" align="center"                height="50">LIBRARY            </td>        </tr>        <tr>            <td align="center" height="50">                <b>Thursday</b>            </td>            <td align="center" height="50">Phy</td>            <td align="center" height="50">Eng</td>            <td align="center" height="50">Che</td>            <td colspan="3" align="center"                height="50">LAB            </td>            <td align="center" height="50">Mat</td>        </tr>        <tr>            <td align="center" height="50">                <b>Friday</b>            </td>            <td colspan="3" align="center"                height="50">LAB            </td>            <td align="center" height="50">Mat</td>            <td align="center" height="50">Che</td>            <td align="center" height="50">Eng</td>            <td align="center" height="50">Phy</td>        </tr>        <tr>            <td align="center" height="50">                <b>Saturday</b>            </td>            <td align="center" height="50">Eng</td>            <td align="center" height="50">Che</td>            <td align="center" height="50">Mat</td>            <td colspan="3" align="center"                height="50">SEMINAR            </td>            <td align="center" height="50">SPORTS</td>        </tr>    </table></body> </html>
Output:
We can also add the styling elements such as font color, back ground color, back ground image, etc. to the above Time table. The attributes that can be added to table are:
align: Aligns left, right and center.border: Sets the border of a table(table border width)bgcolor: Sets the background color for a cell or whole table.colspan: Sets the number of columns to be spanned.rowspan: Sets the number of columns to be spanned.cellspacing: Creates space between the cells.cellpadding: Creates space within the cells.background: Sets the table background with an image.width: Sets width of the table.height: Sets height of the table.
align: Aligns left, right and center.
border: Sets the border of a table(table border width)
bgcolor: Sets the background color for a cell or whole table.
colspan: Sets the number of columns to be spanned.
rowspan: Sets the number of columns to be spanned.
cellspacing: Creates space between the cells.
cellpadding: Creates space within the cells.
background: Sets the table background with an image.
width: Sets width of the table.
height: Sets height of the table.
HTML is the foundation of webpages, is used for webpage development by structuring websites and web apps.You can learn HTML from the ground up by following this HTML Tutorial and HTML Examples.
hardikkoriintern
CSS-Misc
HTML-Misc
CSS
HTML
Web Technologies
Web technologies Questions
HTML
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Types of CSS (Cascading Style Sheet)
Design a Tribute Page using HTML & CSS
How to set space between the flexbox ?
How to position a div at the bottom of its container using CSS?
How to Upload Image into Database and Display it using PHP ?
REST API (Introduction)
Hide or show elements in HTML using display property
How to set the default value for an HTML <select> element ?
How to set input type date in dd-mm-yyyy format using HTML ?
Types of CSS (Cascading Style Sheet)