Computer Science, asked by duggalpk3, 2 months ago

expalin css rule with na exmaple​

Answers

Answered by meets2431
1

Answer:

A CSS rule is a grouping of one or more CSS properties which are to be applied to one or more target HTML elements. A CSS rule consists of a CSS selector and a set of CSS properties. The CSS selector determines what HTML elements to target with the CSS rule. ... In the example above it is the div part of the CSS rule.

hope this helps u make me brainliest and thank me if this helps u

Answered by Anonymous
3

ANSWER:-

A CSS rule is a grouping of one or more CSS properties which are to be applied to one or more target HTML elements.

A CSS rule consists of a CSS selector and a set of CSS properties. The CSS selector determines what HTML elements to target with the CSS rule. The CSS properties specifies what to style of the targeted HTML elements.

Here is a CSS rule example:-

div {

border : 1px solid black;

font-size : 18px;

}

This example creates a CSS rule that targets all div elements, and the set the CSS properties border and font-size for the targeted elements.

The CSS selector part a CSS rule is the part before the first {. In the example above it is the div part of the CSS rule. The CSS properties are listed inside the { ... } block.

CSS rules have to be specified inside either a style element or inside an external CSS file.

Similar questions