Page 104 - Trackpad_ipro 4.1_Class6
P. 104

Where, HREF attribute contains the path of the stylesheet. For example, if you have saved the file
                  with the styles as style.css, then the code will be:

                  <head>
                  <link rel="stylesheet" type="text/css" href="style.css">

                  </head>
                  If the file is saved in another location, you must provide the complete drive path of the stylesheet.
                  Let us create a web page using the external style sheet. The first step is to create a stylesheet file.
                  Open Notepad and type the following code:

                  body{background-color:green; color:white;}
                  Now, save the file with the name style.css at the same location as the HTML file. Again, open a
                  new notepad window and type the following code:

                  <!DOCTYPE html>
                  <html>

                  <head>
                  <title> Using External Stylesheet</title>
                  <link rel="stylesheet" type="text/css" href="style.css">
                  </head>

                  <body>
                  Text with white colour and background colour is green

                  </body>
                  </html>
                  When you view the preceding web page in browser, you will get the following output:













                  You  can  also  use  the  6  digits  hexadecimal  code  in  place  of  colour  name.  For  example,  the
                  hexadecimal code #000000 represents the black colour and #FFFFFF represents the white colour.
                  For example:

                  body{background-color: #000000;}


                      Tech

                        Funda

                                     You can easily get hexadecimal code of any colour from color picker. Type
                                     color picker in google and select any colour to get the hexadecimal code.




                   102     iPro (Ver. 4.1)-VI
   99   100   101   102   103   104   105   106   107   108   109