Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 61 - 2609_Logiccode
P. 61

    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 10.  Write the HTML code to present the given web page using the <TABLE> tag and related
                               tags to create an HTML table.

                     <!DOCTYPE HTML>

                     <HTML>                                                                          To Focus on the
                                                                                                SHORT KEY
                     <HEAD>                                                                          URL bar:

                     <TITLE>Student Information Table</TITLE>                                         Ctrl +      L

                     </HEAD>

                     <BODY>
                     <TABLE>

                     <CAPTION>Student Information</CAPTION>

                     <TR>
                     <TH>Roll Number</TH>

                                                                                              Lists and Tables in HTML5  59

| 56 57 58 59 60 61 62 63 64 65 66 |