Like HTML and other computer languages, CSS Syntax also written to CSS Rule. Through which CSS Declarations written for the HTML document.
CSS Syntax also called Style Rule. The Style Rule consists mainly of two parts. You can see them in the image above.
- CSS Selectors
- CSS Declaration
A Selector is the word / word group / letter for which ‘Style Rule’ written. It written outside of ‘Curly Bracket’. This is usually ‘HTML Tag’. But, it can be written by giving any name. Click to know more about CSS Selectors.
Declaration is the part of the Style Rule in which Style announced for a selector. It also has two parts.
- Property – Property Style is the part of Rule that Style we want to apply to a ‘Selector’. It written within the curly bracket. It may assume the attribute of the HTML tag.
- Value – The third part of the Style Rule is Value. It also written within the Curly Bracket. Value is set for the property in it. The “Value” of the Property Selector called “how”.
<p>Hi, This is an Example</p>
<p>These paragraphs are styled with CSS.</p>