Basically, CSS is a language structure that describes the style of some HTML file (can also be used for XML), defining how it should be displayed. This structure allows developers to manage the behavior on one or multiple web pages; any change performed on some CSS element will be reflected in all HTML elements linked to it.
CSS is based on rules. These rules are defined on .css
files, called style sheet. Style sheets can be composed of one or more rules, applied to one HTML or XML document; the rule has two parts: selector and declaration:
h4 { color : red}
The h4
element is the selector, and { color : red }
is the declaration.
The selector works as a link between the document and the style, specifying the elements that will be affected by that declaration. The statement is the part of the rule that states what the effect will be. In the previous example, selector h4
indicates that all elements h4
will be affected by the declaration stating that the color...