An **id** is a unique identifier for a single HTML element. A **class** is a reusable identifier that can be applied to multiple elements.

You’d want to use an **id** when you need to address a single element either through CSS or JavaScript. And you’ll want to use a **class** when you need to address a group of DOM elements.
In CSS:
- **#id** selects a specific element with that id.
- **.class** selects all elements with that class.