Page 41 - PortGPT_V2.1_C7_Flipbook
P. 41

<TD> Aarav </TD>
                        <TD> B </TD>
                        <TD> M </TD>
                 </TR>
                 <TR>
                        <TD> 2 </TD>
                        <TD> Gauransh </TD>
                        <TD> A </TD>
                        <TD> M </TD>
                 </TR>
                 <TR>
                        <TD> 3 </TD>
                        <TD> Himakshi </TD>
                        <TD> A </TD>
                        <TD> F </TD>
                 </TR>
                 <TR>
                        <TD> 4 </TD>
                        <TD> Rakshit </TD>
                        <TD> B </TD>
                        <TD> M </TD>
                 </TR>
                 </TABLE>
                 </BODY>
                                                                                Creating table
                 </HTML>
                 In the preceding code, you have seen that rows are created by using the <TR> tag. Rows are further
                 divided into cells by using the <TD> tag. These cells contain data of the table.


                 Using border-spacing Property
                 The border-spacing property is used to specify the space between the borders of adjacent cells. For
                 example:

                 <style>
                 table, th, td
                 {
                     border:2px;
                     border-style:solid;
                     border-color:green;
                     border-spacing:15px;
                 }

                 </style>

                                                                                    Using border-spacing property



                                                                                         Lists and Tables in HTML5  39
   36   37   38   39   40   41   42   43   44   45   46