Page 121 - iPrime_V2.2_class7
P. 121

{
                     border:2px;
                     border-style:solid;

                     border-color:green;
                     background-color:orange;
                     color:blue;
                 }
                 </style>








                                   If HTML tables were a city map and lists were the landmarks, how would you
                                   design a webpage that guides visitors  on a journey  through  your creative
                                   vision?


                 Attributes of the <TD> Tag

                 Following are the attributes used to present the cell or table data in more effective manner:

                     ROWSPAN: The ROWSPAN attribute applies when a cell is extended for more than one row,
                   that is, the cell spans for 2 or more rows instead of 1 as shown in below table.
                    Here, the cell “Sports” is taking a span of 3 rows and “Martial Arts” is taking a span of 2 rows.
                   Example for using ROWSPAN attribute is:

                               <TD ROWSPAN="3">


                                          Category                                  Types

                                                                    Badminton
                           Sports                                   Football

                                                                    Basketball
                                                                    Judo
                           Martial Arts
                                                                    Karate


                     COLSPAN: The COLSPAN attribute applies when a cell is extended to more than one column,
                   that is, the cell spans for 2 or more columns instead of 1, as shown in the table below:

                                          Roll No.         Name           Marks     Grade
                                                       First     Last




                 Here, “Name” cell is taking a span of 2 columns.




                                                                                      Lists and Tables in HTML     119
   116   117   118   119   120   121   122   123   124   125   126