+ 2
What is the difference between ID and CLASS In Html?
4 Answers
+ 4
In the CSS, a class selector is a name preceded by a full stop (â.â) and an IDselector is a name preceded by a hash character (â#â). The difference between an ID and a class is that an IDcan be used to identify one element, whereas a class can be used to identify more than one.
+ 3
In id, the priority of styles in css is higher; unlike classes, id is better used for binding anchor links, for binding label to input, and for binding events js.
0
ID es un atributo Ășnico que solo puedes usar en una etiqueta, no puedes repetir el mismo valor en otro id, y CLASS lo puedes usar mĂșltiples veces, reutilizar su valor cuantas veces quieras đđ»đđ
0
"id" is not duplicate and can be assigned only once and only to one element. "class" can merge a group of elements. When styling in CSS, the priority for id = 100, class = 10, tag name = 1.