ID should be avoided when styling if possible. As it has high specificity and it can be overriden only if you inline styles, or add styles into ```<style>```.TheweightofIDoverridesclassselectorsandtypeselectors.
Remember, the ID selector must match an HTML element's ID attribute.
```html
<divid="specified_id"><!-- content --></div>
```
### Specificity
ID selectors have a high specificity making them difficult to override. Classes have a much lower specificity and are generally the preferred way to style elements in order to avoid specificity issues. [Specificity on MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity)
#### More Information:
<ahref="https://www.freecodecamp.org/challenges/set-the-id-of-an-element"target="_blank">freeCodeCamp Challenge - Set the ID of an Element</a>
<ahref="https://www.freecodecamp.org/challenges/use-an-id-attribute-to-style-an-element"target="_blank">freeCodeCamp Challenge - Use an ID Attribute to Style an Element</a>