What is a CSS rule?

Technology CommunityCategory: CSSWhat is a CSS rule?
VietMX Staff asked 3 years ago

Web browsers apply CSS rules to a document to affect how they are displayed. A CSS rule is formed from:

  • set of properties, which have values set to update how the HTML content is displayed,
  • selector, which selects the element(s) you want to apply the updated property values to.

A set of CSS rules contained within a stylesheet determines how a webpage should look.