KnowledgeBoat Logo
|
LoginJOIN NOW

Computer Applications

What is CSS style rule? How do you define it ?

CSS

7 Likes

Answer

A CSS rule is a single statement in a style sheet that identifies what should be styled (the selector) and how those styles should be applied (the declaration).

We define a rule by writing the selector tag without angle brackets. The properties and their values are written in the following syntax:

selector { propertyname : value ; propertyname : value ; ...}

For example, if we want <H3 tag to have font face Arial and red color then we define the style rule as follows:

h3 { font.family : Arial ; color : red ; }

Answered By

2 Likes


Related Questions