CSS Syntax

A CSS rule-set consists of a selector and a declaration block:

css syntax

  • Selector: Selector indicates the HTML element you want to style . It could be any tag like <span>, <p> etc.
  • Property: A Property is a type of attribute of HTML element. It could be padding, margin etc.
  • Value: Values are assigned to CSS properties. For example, color property can have value either red or #FF0000 etc.