Which is the correct CSS syntax?
-
body {color: black}
-
{body:color=black(body}
-
{body;color:black}
-
body:color=black
A
Correct answer
Explanation
CSS syntax uses a selector followed by curly braces containing property:value pairs. The correct format is: selector { property: value; }. Option A (body {color: black}) correctly shows this syntax. Options B and C have incorrect bracket placement. Option D uses an equals sign instead of curly braces and colons, which is JavaScript object syntax, not CSS.