Page 121 - CodePilot V5.0 C7
P. 121

The following are the components of an HTML table:


                                                                                                     Caption

                          Table header
                                                                                                     Row
                               Column
                                                                                                     Cell





                     Row: A row is a horizontal line of cells in a table.

                     Cell: A cell is a box formed by the intersection of a row and a column in a table.
                     Caption: A caption is a brief description about the table at the top or bottom of the table.

                     Column: A column is a vertical line of cells in a table.

                     Heading: A table heading is the first row of the table, which describes the column or row.
                 To create a table in HTML, you can use five basic tags:

                     <TABLE>: The <TABLE> tag is used to create a table for displaying data in rows and columns.

                     <TR>: The <TR> tag stands for Table Row. It is used for marking the start and end of a row.
                     <TD>: The <TD> (Table Data) tag defines the content of a cell, which can be text, an image,
                    video or any data.

                     <CAPTION>: The <CAPTION> tag is used to provide a description or title of the table.

                     <TH>: The <TH> tag stands for a table header in an HTML table. A table header is used to specify
                    a column heading.

                    Code     Write the HTML code to present the given web page using the <TABLE> tag and related
                     10      tags to create an HTML table.


                 <!DOCTYPE HTML>                                                            SHORT SIGN

                 <HTML>
                                                                                           To Focus on the URL
                 <HEAD>                                                                        bar: Ctrl + L
                 <TITLE>Student Information Table</TITLE>

                 </HEAD>

                 <BODY>
                 <TABLE>

                 <CAPTION>Student Information</CAPTION>

                 <TR>

                 <TH>Roll Number</TH>



                                                                                                                  119
                                                                                          Lists and Tables in HTML5
   116   117   118   119   120   121   122   123   124   125   126