CSS style rules

4 months ago from

When using HTML, you need to follow certain specifications. The same is true for CSS. To skillfully use CSS to decorate web pages, you first need to understand CSS style rules. The specific formats are as follows:

Selector {attribute: attribute value; attribute: attribute value;}

In the above rule:

  1. The selector is used to specify the HTML object to which the CSS style works, and the specific style set for the object is in curly braces.

  2. Attributes and attribute values appear as key value pairs.

  3. Property is the style property set on the specified object

  4. The attribute and attribute value are connected in English with ":"

  5. Multiple "key value pairs" are distinguished by English ";