Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 43 - CoreGPT(Podar)_Flipbook_C8
P. 43

    Following is an example of a table:

                                                               Table: Student

                                     Roll No.             Name               Grade              Gender
                                         1          Aarav                       B                  M
                                         2          Gauransh                    A                  M
                                         3          Himakshi                    A                   F
                                         4          Rakshit                     B                  M
                                                                Students record

                     Where, Table: Student is the Title of the table which can be inserted by using the <CAPTION>
                     tag. Roll No., Name, Grade and Gender are the table headings that can be created by using
                     the <TH> tag.
                     Attributes of the <TABLE> Tag

                     The following attributes are used to present a table efficiently:

                        BORDER: The BORDER attribute is used to set the border of the table. The default value of
                         the BORDER attribute is 0. You can set the border of the table by providing numeric value to
                         the BORDER attribute in the following way:
                         <TABLE BORDER="2">

                        BORDERCOLOR: The BORDERCOLOR attribute is used to give color to the border of the table.
                         The value of this attribute can be the name of any permitted color or any value of the color
                         using RGB color code in hexadecimal notation (like #DDDDFF value is given for light blue
                         color). You can use the BORDERCOLOR attribute to set the border color in the following way:

                         <TABLE BORDER = "2" BORDERCOLOR="Blue">
                         or
                         <TABLE BORDER = "2" BORDERCOLOR="#DDDDFF">
                        FRAMES: The  FRAMES attribute  allows you to show borders  only at specified sides. For
                         example, if the value of the FRAMES attribute is:
                         •  “box” or “border”-the border is displayed on all four sides.

                         •  “above”-the border is displayed on the top side only.
                         •  “below”-the border is displayed at the bottom side only.
                         •  “hsides”-the border is displayed at both top and bottom sides.

                         •  “lhs”-the border is displayed at the left hand side only.
                         •  “rhs”-the border is displayed at the right hand side only.
                         •  “vsides”-the border is displayed at the both left and right sides.
                         •  “void”-no border is displayed.

                        BGCOLOR: The BGCOLOR attribute is used to change the background color of the table. The
                         value can be any permitted color name or its HEX equivalent value. For example,

                           <TABLE BGCOLOR="Green"> or <TABLE BGCOLOR="#FFOOOO">

                                                                   Working with Lists, Images and Tables in HTML         41

| 38 39 40 41 42 43 44 45 46 47 48 |