Page 77 - modular_v2.0_HTML&_CSS_Fb
P. 77

BORDER-STYLE:SOLID;

                 BORDER-COLOR:GREEN;

                 BACKGROUND-COLOR:ORANGE;

                 COLOR:BLUE;

                 }

                 </STYLE>                                                             Using Color Property

                 Colspan and Rowspan attributes are used to span multiple columns and multiple rows for a
                 single cell. COLSPAN is used to merge two or more columns, and ROWSPAN is used to merge
                 two or more rows. Let us create another program using the COLSPAN and ROWSPAN attributes
                 of the table.
                 <!DOCTYPE HTML>

                 <HTML>
                 <HEAD>

                     <TITLE>Student's Data</TITLE>
                     <STYLE>

                         TABLE {
                             width: 100%;
                             border-collapse: collapse;

                             background-color: lightpink;
                             border: 2px solid green;
                         }
                         TH, TD {

                             border: 2px solid green;
                             padding: 10px;
                             text-align: center;

                         }
                     </STYLE>
                 </HEAD>
                 <BODY>



                     <H2>Student's Data</H2>
                     <TABLE>
                         <TR>

                             <TH ROWSPAN="2">S.No</TH>
                             <TH ROWSPAN="2">Name</TH>


                                                                                                                75
                                                                                               Tables in HTML
   72   73   74   75   76   77   78   79   80   81   82