Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 68 - 2609_Logiccode
P. 68

    USING THE WIDTH PROPERTY
                      The CSS WIDTH property specifies the width of the element’s content area.

                      Syntax: WIDTH: value;
                      For example:

                      WIDTH: 70%;
                      The preceding code sets the width of the element to 70% of its parent element.

                           Tick ( ) if you know this.

                           ▶   The padding property sets space on all four sides in one declaration, using units like pixels or
                             percentages.

                           ▶   The background-color property is used to specify the colour for the background in a table on the
                             web page.

                      Code 13.  Write the HTML code to present the given web page using CSS properties to style the
                                <TABLE> tag.

                      <!DOCTYPE HTML>

                      <HTML>
                      <HEAD>

                      <TITLE>Components and Functions
                      </TITLE>
                      <STYLE>

                      TH, TD {
                      BORDER: 1PX solid #999;

                      PADDING: 20PX 20PX;
                      }

                      </STYLE>
                      </HEAD>

                      <BODY>
                      <TABLE STYLE="WIDTH: 80%; BACKGROUND-COLOR: #F0F8FF; COLOR: #333;">

                      <CAPTION STYLE="CAPTION-SIDE:BOTTOM;">Components of Artificial
                      Intelligence and Robotics</CAPTION>

                      <TR>
                      <TH STYLE="BACKGROUND-COLOR: #CCE5FF;">Component</TH>
                      <TH STYLE="BACKGROUND-COLOR: #CCE5FF;">Function</TH>

                      </TR>

                       66   Premium Edition-VII

| 63 64 65 66 67 68 69 70 71 72 73 |