Every language comprises of some certain set of rules which defines the syntax of that language. In the same
way CSS is also comprised of certain rules which are applied on HTML. These rules are then interpreted by
web browsers which perform the operations (like changing font size, changing color of a certain element)
accordingly.
CSS rules always consist of a Selector
and Declaration
& each
declaration
further consists of property
and value
separated by
colon(:)
as shown below:
Style rule in CSS
consist of following :
semi-colon(;)
.
Each declaration block in CSS contains :