CSS Overview: Selectors, Integration, Inheritance, Cascading
To understand CSS, you have to understand the DOM (Document Object Model). A rendering engine creates the DOM by parsing your HTML source code, so the two are definitely related, but they are not the same thing. As Mozilla Developer Network puts it:
Ultimately, all DOM objects are boxes, so when you’re working with CSS, you are manipulating boxes in the DOM that were generated from your HTML.