Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 27 - 2606_PlugGPT_C7_Flipbook
P. 27

    <TD>545</TD>
                     </TR>
                     </TABLE>
                     </BODY>
                     </HTML>

                               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

                                                                                              Lists and Tables in HTML5  25

| 22 23 24 25 26 27 28 29 30 31 32 |