You can define your own selectors with class selector classes and identity selector IDs.
The advantage of this is that depending on the class or ID, you can perform the same HTML elements differently.
In CSS, the class selector precedes a half-width period (.), and the ID is preceded by a half-width English pound sign (#).
Looks like this:
#top {background-color: #ccc; padding:1em}. intro {color:red; font-weight:bold;}
HTML joins the CSS with the attribute ID and class. Like this:
Chocolate Curry
This is my recipe-making curry purely with chocolate
Mmm mm Mmmmm
The difference between ID and class is that the ID is used on the unique element, and the class is used on more than one element.
You can also apply a selector to a specified HTML element, placing the HTML selector in front of it, so that P.jam {whatever} is applied to the paragraph with the class "jam".
An ID name is usually uniquely defined on a page, so defining a CSS in a page usually suggests a class, so you can reuse your CSS. and leave the ID to the JavaScript that most needs to use HTML elements, etc.