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

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.

                    ATTRIBUTES OF THE <TR> TAG

                 The <TR> stands for Table Row, which is used to starts a row and ends up with </TR>. It is a
                 container tag. All the attributes discussed with <TD> tag can also be used with the <TR> tag
                 except the ROWSPAN and COLSPAN attributes.



                    Recap



                         Table represents data in the form of rows and columns.
                         The <TD> tag is used to insert data into cells.
                         The <TR> tag is used to create a row in a table.




                                                        Exercise



                 A.   Tick ( ) the correct option.
                            ü
                      1.  Which tag allows you to insert a table in a web page?

                          a.   <IMG>                                       c.   <A>
                          b.   <TABLE>                                     d.   <LI>

                      2.  Which CSS property gives space between the border of adjacent cells?
                          a.   BORDER-SPACING                              c.   WIDTH
                          b.   ROWSPAN                                     d.   COLSPAN

                      3.  Which of the following tags is used to give the title of the table?
                          a.   <TR>                                        c.   <TH>

                          b.   <CAPTION>                                   d.   <TD>
                      4.  Which of the following tag defines the description term?

                          a.   <DD>                                        c.   <DT>

                          b.   <DL>                                        d.   <LI>






                                                                                                                77
                                                                                               Tables in HTML
   74   75   76   77   78   79   80   81   82   83   84