An **id** is a unique identifier for a single HTML element. A **class** is a reusable identifier that can be applied to multiple elements. ![ID vs Class in HTML](https://assets.roadmap.sh/guest/css-classes-vs-id-example-9ufsl.png) 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.