Page 174 - Computer Software Application TP - Volume 1
P. 174

COMPUTER SOFTWARE APPLICATION - CITS



           EXERCISE 44 : Creating CSS



            Objectives

           At the end of this exercise you shall be able to
           •  use css in HTML page
           •  manipulate the style property of HTML elements using javascript.


           Requirements


           Tools/Materials
           •   Desktop / Laptop with latest configuration
           •   Text editor
           •  Web browser


           Procedure

           TASK 1: Using CSS Element Selector

           1  Using open the text editor
           2  Write the following codes
              <html>
              <head>
              <style>

              p{
              text-align: center;
              color: blue;
              }
              </style>
              </head>
              <body>
              <p>This style will be applied on every paragraph.</p>
              <p id=”para1”>Me too!</p>
              <p>And me!</p>

              </body>
              </html>
           3  Save the program as a .html file
           4  Open the html file with a web browser
           5  Verify the output.















                                                           159
 CITS : IT & ITES - Computer Software Application - Exercise 43
   169   170   171   172   173   174   175   176   177   178   179