Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 40 - 2625 PortGPt V2.1
P. 40

    You can use any one of these styles at a time. If you use the None style, the border will not appear.
                      For example:

                      <style>
                      table, th, td {border:2px; border-style:solid;}
                      </style>

                      Using border-color Property

                      The border-color property allows you to apply a colour to the border. For example,

                      <style>
                      table, th, td
                      {
                      border:2px;
                      border-style:solid;

                      border-color:green;
                      }
                      </style>
                      Let us create a table using the above properties.

                      <!DOCTYPE html>
                      <HTML>
                      <HEAD> <TITLE> Students of Class 8 </TITLE>
                      <STYLE>

                      TABLE, TH, TD
                      {
                      border:2px;
                      border-style:solid;
                      border-color:green;
                      }
                      </STYLE>
                      </HEAD>

                      <BODY>
                      <TABLE>
                      <CAPTION> Table : Student </CAPTION>
                      <TR>
                             <TH> Roll No. </TH>
                             <TH> Name </TH>
                             <TH> Grade </TH>
                             <TH> Gender </TH>
                      </TR>
                      <TR>
                             <TD> 1 </TD>

                      38    Premium Edition-VII

| 35 36 37 38 39 40 41 42 43 44 45 |