Selectors and Style Rules
Note CSS is no more than a collection of style rules, and each style rule is made up of a selector and a definition. Don’t let it get more complicated than that.
A style rule’s selector determines what it affects, and the definition determines how it is affected.
So, just as it is the entire job of HTML to define the document’s structure, it is the entire job of CSS to lay out and style that structure to appear as it should and where it should.
With the combination of the document object model (DOM) of HTML ...