What does it mean to declare something?

What does it mean to declare a CSS selector?

Eg.

body {
  font-size: 100%;
}

Above is a selector rule declaration.

Everything in CSS is a declaration. There is no logic.

but what does it mean in css to declare something and, thanks

A declaration is a statement that always applies, unconditionally. That’s why we call them rulesets.

sorry but i still dont understand

thank you, anyway mtf

“Today the Mayor declared it as CSS Appreciation Day.”

When we write a selector rule, everything inside the curly braces is a declaration.

/* everything below is a ruleset */
selector {
    property: value;    /* this is a declaration */
}    
/* everything is included in the declaration block {}

this helped and i went on and reviewed other sources a bit more, thanks

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.