0
What are classes and id? are they the same?(IN HTML AND CSS)
I could not figure out about class es and id and there uses
4 ответов
+ 5
id is used by only one element, and generally used just for js to single out that one element
class can b used by multiple elements and is used for styling like
.bg-blue {
background-color: blue;
color: white;
}
and u could use that class for any element to b styled that way, in css class is defined as
.class
and id...
#id
0
*id can be applied once per page
*class can be applied multiple times in a page
0
in css
class elements are specified with (.)
id elements are specified with (#)
0
thanks