The Basic Purpose of the CSS (Cascading Stylesheet) language is to allow a browser engine to modify and Decorate
elements of the Web page with specific features, like positioning, decorations or colors.
therefore, a CSS rule-set consists of a declaration and a selector, the CSS syntax reflects this basic purpose and its building blocks are:
The property defined as which feature is considered as an identifier, that is a human-readable name.
The value, Each property has a set of valid values, defined by a formal grammar, which describes how
the feature must be handled by the engine, as well as a semantic meaning, implemented by the browser engine.
therefore, The selector defined as they point to the HTML element you want to style.
here, The declaration block defined as it contains one or more declarations separated by semicolons.
where, Each declaration includes a CSS property name and a value, separated by a colon.
A CSS declaration blocks are surrounded by curly braces and always ends with a semicolon.
CSS declarations define as a property and value pair is known as a declaration, and any CSS engine calculates which
declarations hence, apply to every single element of a web page in order to appropriately layout and to style and decorate it.
The id Selector
The class Selector
therefore, CSS selectors defined as it is used to “select” (or find) HTML elements based on their element name, id, class, attribute, and more
The element Selector
first of all, In the case of element, the selector selects elements based on the element name.
finally, let’s see the example consequently, You can select all
elements on a page like this (in this case, all
elements will be center-aligned, with a black text color):