---
title: "Discussion on \"What happens if Id and Class are applied to the same and have conflicting?\" | Hashnode"
description: "Discussion on \"What happens if Id and Class are applied to the same and have conflicting?\". Learned from Free Code Camp's Responsive Web Design:One cool thing about id attributes is that, like classes, you can style them using CSS. However, an id is not reusable and should only be applied to one element. An id also has a higher\nspecificity ..."
url: "https://hashnode.com/posts/what-happens-if-id-and-class-are-applied-to-the-same-and-have-conflicting/61efc5da87fd2728e7cd2bbb"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [What happens if Id and Class are applied to the same and have conflicting?](https://mohitsaud.hashnode.dev/what-happens-if-id-and-class-are-applied-to-the-same-and-have-conflicting?utm_source=hashnode&utm_medium=feed)

Learned from Free Code Camp's Responsive Web Design:One cool thing about id attributes is that, like classes, you can style them using CSS. However, an id is not reusable and should only be applied to one element. An id also has a higher specificity ...

Jan 25, 2022 · 1 min read · mohitsaud.hashnode.dev  
Read the article

-   [#css](https://hashnode.com/tag/css)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Mohit Saud](https://hashnode.com/@mohitsaud)

@mohitsaud · Nepal

  
[View profile](https://hashnode.com/@mohitsaud)

Aspiring Software Developer

Watched a lot of movies during the early months of pandemic and one day decided to code and now it's my one of my favourite things to do. Coding boosts my mind, makes me focused and keeps motivated.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
