Skip to content
Sign upLog in
← Back to Community
Id Element in css?
Profile icon
NotInnit

Can someone plz explain the id element to me please

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
SegundoPERRY
Profile icon
NotInnit
Comments
hotnewtop
Profile icon
Coder100

yes, the id attribute is used for only one element only.
Then, you can do it like this:

#something { color: red; }

in css.

The id is useful for:

  • when you want only one element

otherwise use classes.

Profile icon
NotInnit

@Coder100
Thanks

Profile icon
Coder100