Home HTML Tutorial for beginners 13 How to write CSS

13 How to write CSS

34
0

A CSS statement is called a CSS rule. A CSS rule consists of a selector and a declaration block. The declaration block consists of one or more declarations separated by semicolons. Each declaration consists of a CSS property name and a value separated by colon.

Example :

h1 { color : blue; font-size: 14px; }

In the above example :

  • h1 is the selector.
  • The text with in opening and closing curly braces is called declaration block.
  • color : blue is a declaration
  • color and font are property names
  • blue and 14px are the values

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here