Multiple choice technology web technology

Which is the correct CSS syntax?

  1. {body;color:black}

  2. {body:color=black(body}

  3. body {color: black}

  4. body:color=black

Reveal answer Fill a bubble to check yourself
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.