CSS Syntax
CSS Syntax
CSS is composed of style rules that the browser interprets and then applies to the corresponding elements in the document.
Basic Structure of CSS Syntax:-
A style rule has three parts: selector, property, and value.
- Selector is the Tag that styles need to be changed.
- Property is the property of that tag to be changed.
- Value is the new value assigned to it.
For your information:-
Both property and value are enclosed in the declaration block i.e, { property: value }
Examples:-
The most common and easy-to-understand selectors are type selectors. This selector targets element types on the page. Elements are of different types like h2,h2,p, div, section, header, and many more.
Syntax:-
Its syntax is:-
< style >
selector{
property: value
}
< /style >