As you have just seen, style rules can modify the built-in tags in HTML by redefining their formatting. Styles don’t stop there, however. You can make your own styles by creating classes and IDs.
Classes and IDs mark certain elements so that you can refer to them in your style sheet. A class can be applied to multiple selections, whereas an ID uniquely identifies a specific selection within a document. (Different documents can use the same ID.)
For example, suppose you have an unordered list of products, and you want new products to appear in red. One way to do it would be to manually add the style=“color: red” attribute to each of the list items, like this:
<li style="color: red">Spraying Techniques for ...