Which is the correct CSS syntax?
-
{body;color:black}
-
{body:color=black(body}
-
body {color: black}
-
body:color=black
C
Correct answer
Explanation
CSS syntax requires a selector, followed by curly braces containing property-value pairs separated by colons. Each declaration ends with a semicolon. Option C shows correct syntax: body {color: black;} where body is the selector and color: black is the declaration.