CSS Syntax

CSS Syntax

  • CSS Syntax has two parts namely a Selector and one or more Declaration. The Selector is a normal HTML element. Each Declaration consists of a property which is the attribute you want to change and property's value.
    Ex:
    body{
     color : yellow;
    }

  • For more readable, put one declaration on each line. 

  • CSS Comments
    Comments are used to describe the code & more helpful to refer code later date. For both single line & multiple lines uses same comment in CSS. It starts with /* & ends with */.
    Ex:
    /* This is a CSS Single line comment */
    body{
     color : yellow; /* This describes font color of the HTML Body */
    }

No comments:

Post a Comment