Cover image for Id Classes Attributes tags

Id Classes Attributes tags

giandodev profile image GiandoDev ・1 min read

If we need to select the element inside the html we have to decide if we want to select one element or multiple elements.
In the first case id is perfect, we can't name two elements with the same id ( the id is unique ).
Alt Text
To select more than one element we may use classes or attribute.
Alt Text
In general we use classes to select multiple elements and attribute to filter through them.
Alt Text
It`s a good practice to use js prefix for the elements that require javaScript to work.
Alt Text

Posted on May 12 by:

giandodev profile



Hi, I am Giandomenico. I love to learn new stuff and solve problems.


markdown guide