Forgot password?


CSS syntax

  • A CSS rule consists of a selector and a declaration block.
  • syntax

    A style rule is made of three parts,there are

  • selector
  • Property
  • Value
  • Selector

    A selector is an HTML tag at which a style will be applied. This could be any tag like h1,table etc.


    A property is a type of attribute of HTML tag. Put simply, all the HTML attributes are converted into CSS properties. They could be color, border etc.


    Values are assigned to properties. For example, color property can have value either red or #F1F1F1 etc


    p {
      color: red;
      text-align: center;

    Example Explained