+ 2

What is the difference between ID and CLASS In Html?

20th Jul 2019, 5:53 AM
hami boy🇪🇹
hami boy🇪🇹 - avatar
4 odpowiedzi
+ 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.
20th Jul 2019, 6:33 AM
Muaz Ahmad
Muaz Ahmad - avatar
+ 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.
20th Jul 2019, 5:57 AM
Anna/Аня
Anna/Аня - avatar
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 👍💻🙋😀
25th Jul 2019, 10:13 PM
Samuel Alejandro Gonzalez
Samuel Alejandro Gonzalez - avatar
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.
2nd Aug 2019, 8:50 AM
Andriy Halychanivskyi
Andriy Halychanivskyi - avatar