Classes & id's work as HTML selectors that group content together so that it can be stylized and edited with CSS rules.
The ID selector can only be used once for a particular block section, such as the header, footer, & columns in the layout of the page.
Classes are inline selectors that go "inline" with the content of the page, such as changing the color of a word inside a sentence.
These are called parent and child elements. The children take on attributes from their “parents” or in the case of CSS, the text inside of or below an attribute that doesn’t have any specific styling, takes on the styling of the element above or outside of it.
Exception: If you have a link inside a webpage, you would be required to specify the link in CSS to change its styling.