Pages

Saturday 28 June 2014

Cascading Style Sheets(CSS)

What is CSS?

  • CSS stands for Cascading Style Sheets
  • Styles define how to display HTML elements
  • Styles were added to HTML 4.0 to solve a problem
  • External Style Sheets can save a lot of work
  • External Style Sheets are stored in CSS files 
Note :
Styles are normally saved in external .css files. External style sheets enable you to change the appearance and layout of all the pages in a Web site, just by editing one single file!

    How to Link HTML To CSS?

    1.how to open in Visual studio: 
    Ans-file -new -webpage- stylesheet(chose)
    2.how to link html page to css page:
    Ans-
      Css program
    .Textbox         //textbox present in html page using this we r access for color or anystyle
     {
      background-color:blue
       color:red
    }
    .Dropdown      //same(another properties)
    {
    border-button-color:Green;
    border-left-color:red;
    border-right-color:red;
    color:green;
    Note: We cam use N nomber of properties.
             Every properties before u use dot(.)Ex: .Textbox
    Sample code for how to wrtite css inside html:
    <!DOCTYPE html>
    <html>
    <head>
    <style>
    body
    {
    background-color:#b0c4de;
    }
    </style>
    </head>

    <body>

    <h1>My CSS web page!</h1>
    <p>Hello world! This is a W3Schools.com example.</p>

    </body>
    </html>

    No comments:

    Post a Comment