Consider:
p {
...
}
.foo {
...
}
#bar {
...
}
What is the correct name for these statements in CSS? I’ve seen them called selectors, rules or rulesets, but which is correct?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A rule would be considered:
p {…}A selector in this case is:
pA rule is made up of selectors and declarations. A declaration is
property:valueso the entire rule would be:selector { property:value }A rule can have multiple declarations and multiple selectors so we can actually have:
A rule set would be multiple rules.
Here’s a quick source on this or the CSS 1 Specification.