How to Code CSS

Coding with CSS is too easy. Firstly you should select tag or id or class which you want to style and then add style using through style element or style attribute which we will study in further section. The property is a attribute of style element and value is the value of style attribute which is given by user.


    selector { property: value }

Example of Code

.practice{ background-color: red; }
<p class="practice">CSS is used to style HTML document<p>


CSS is used to style HTML document