Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 81 - 2612_Digimind
P. 81

    Subject: Create a line break

                                            To create a line break, we can use <LI> tag which automatically creates a line
                                            break. We can also put paragraph, line breaks, images, links, other lists, etc.
                                            within this list.

                               TABLES

                     Tables are used in HTML to display data in a tabular format. Presenting information in a tabular
                     form makes it easy to understand. To create a table in HTML, we use five basic tags:

                        <TABLE> tag: The table is defined with this tag. All other tags are enclosed within the <TABLE> tag.
                        <TR> tag: This tag defines a row of cells, where TR stands for Table Row.
                        <TD> tag: This tag defines the data cell, where TD stands for Table Data.
                        <TH> tag: This tag defines the heading of each column or row, where TH stands for Table
                        Header. The heading is displayed as bold-faced and center-aligned in all browsers by default.

                        <CAPTION>  tag: This tag defines the heading of the table. By default, the table caption is
                        centre-aligned.
                     Write HTML codes to show the student's details in a table.

                     <!DOCTYPE html>
                     <HTML>
                     <HEAD>
                     <TITLE> A Simple Table Structure </TITLE>
                     </HEAD>
                     <BODY>
                     <TABLE>
                     <CAPTION> STUDENT'S DETAILS</CAPTION>
                     <TR>
                     <TH>ADMISSION</TH>
                     <TH>NAME</TH>
                     <TH>TOTAL MARKS</TH>
                     </TR>
                     <TR>
                     <TD>2016/0256</TD>
                     <TD>Aadya Kaushal</TD>
                     <TD>589</TD>
                     </TR>

                     <TR>
                     <TD>2017/0865</TD>
                     <TD>Shweta Kaushal</TD>

                                                                                              Lists and Tables in HTML5  79

| 76 77 78 79 80 81 82 83 84 85 86 |