Which is the correct CSS syntax?
-
body {color: black}
-
body:color=black
-
{body:color=black(body}
-
{body;color:black}
A
Correct answer
Explanation
CSS uses selector {property: value} syntax, where the selector targets an HTML element and the declaration block in braces contains styles. Option A correctly shows 'body {color: black}' with proper selector, braces, and property-value colon separator. Option B incorrectly uses equals sign instead of colon, Option C misplaces braces outside the selector, and Option D uses semicolon instead of colon before the value.