Ids and Classes are attributes we add to HTML elements. Say you wanted to style an element, rather than styling each element in HTML, we add these attributes, which are essentially identifiers. Then we can reference these attributes by using selectors in our css file, and add whatever styling we want from there.
Ids are used when you want to style one particular element only. By adding a unique id attribute to the specific element, you can cite it in your styling by selecting it using the "#" selector.
Whereas, Classes are used when you want to style a group of elements the same way. By adding the same class attribute to each element, you can then refer to them all at the same time in your style coding by selecting them using the "." selector.