Blog Desk       February 10, 2020      1258

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

Explanation

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.

Example:

body {color: #000000;}