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
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.