English

What is wrong with the following CSS definition? body (color = "black"; )

Advertisements
Advertisements

Question

What is wrong with the following CSS definition?

body (color = "black"; )
Code Writing
Very Short Answer
Advertisements

Solution

Parentheses (instead of curly braces) and the equal sign (instead of a colon) are not allowed in CSS rules. The proper code looks like this:

body { color: "black"; }
shaalaa.com
  Is there an error in this question or solution?
Chapter 6: Cascading Style Sheets (CSS) - Assisted Practice [Page 273]

APPEARS IN

Sumita Arora Computer Applications [English] Class 10
Chapter 6 Cascading Style Sheets (CSS)
Assisted Practice | Q 1. | Page 273
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×