Ask coding questions

← Back to all posts
Id Element in css?
NotInnit (3)

Can someone plz explain the id element to me please

Answered by Coder100 (18123) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (18123)

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.