Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 36 - 2615_KEC
P. 36

    STYLING TABLES USING CSS

                      CSS allows us to style tables for a single HTML page. It is defined using the <Style> tag in the head
                      section of the HTML document.

                      Syntax of using the <STYLE> tag:

                       <HEAD>
                           <STYLE>
                           Tag_Name                                    Selector: We write the name of the tag to be styled here.
                           {
                                                                       Declaration Box: We mention the tag properties that
                           Property_name: value;
                                                                       need to be styled along with the properties in it. The two
                           }                                           parts of a declaration box are name and value. A property
                                                                       along with its value is called a declaration.
                       </STYLE>
                       </HEAD>

                           PURE        CSS (Cascading Style Sheets) was first proposed by Håkon Wium Lie on October 10, 1994
                           FACT        while working with Tim Berners-Lee at CERN.

                      BORDER PROPERTY
                      The border property is used to define the border of a table.

                            Property                 Options               Description                  Values

                                                                       Specifies the thickness  Thickness in cm, px, pt,
                                              width
                                                                       of the border             medium or thick

                                                                                                 Dotted, dashed, solid,
                                                                       Specifies the type of     double, groove, ridge,
                              border          style
                                                                       border                    inset, outset, none and
                                                                                                 hidden

                                                                       Specifies  the colour  of   Colour name
                                              colour
                                                                       all sides of the border

                      An HTML codes to use border property:

                      <!DOCTYPE html>

                      <HTML>
                      <HEAD>

                      <TITLE>A Simple Table Structure</TITLE>

                       34   Premium Edition-VII

| 31 32 33 34 35 36 37 38 39 40 41 |