Blog Desk       February 10, 2020      1272

Which is the correct CSS syntax?

  1. {body;color:black;}
  2. {body:color=black;}
  3. body {color: black;}
  4. body:color=black;

The Right Answer is : Option C


CSS selector

The selector refers to the HTML element you want to make a style. Declaration blocks are surrounded by curly braces. Each declaration includes a CSS property name and a value, separated by a colon.  Multiple CSS declarations are separated with semicolons.


body {color: #000000;}