What is ruleset in CSS?

Questions by JohnMathew   answers by JohnMathew

Showing Answers 1 - 6 of 6 Answers

Ruleset identifies selector or selectors and declares style which is to be attached to that selector or selectors. For example P {text-indent: 50pt} is a CSS rule. CSS rulesets consist of two parts: selector, e.g. P and declaration, e.g. {text-indent: 50pt}.

  Was this answer useful?  Yes

chakii

  • Aug 24th, 2008
 

The CSS syntax is made up of three parts: a selector, a property and a value:

Selector {property: value}

Selector is normally the HTML element/tag you wish to define

Property is the attribute you wish to change, and each property can take a value.

The property and value are separated by a colon, and surrounded by curly braces:

body {color: black}

Note: If  the value is multiple words, put quotes around the value:

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions