I'd like to know about creating and manipulating attributes in html that are created . We have the attributes already known as id , class , etc. that we put in the tags so we can manipulate them. I went in search of other alternatives of names, that could attend to me in that end. I saw the " date - " that after the same one can put the name you want (correct me if it is wrong here ) and do such manipulation through that attribute that came with or html5. After using the "data-", I checked if I could create an attribute in the tag with the name I wanted. What I did was this:
<a href="#" data-grupo="13" numberlink="1" class="link" id="um">Link 1</a>
When I went into the element inspector and selected the element through the attribute:
$("a[data-grupo=13]");
He found the element. With this I understand that I can create these tag attributes according to my desire. But I do not know if this is a good practice, because there may be attribute differences for attributes such as the example class and id, in which it can only belong to one element and one to more than one element.
I could not get answers to these questions, I did not find what I wanted here:
Meanings of data-value attributes, data-title, date -... in HTML
Use Attributes unary HTML tags with assigned value
Can I name html tag attributes according to my wishes without generating any problems (in manipulation or any other use of tags or attributes)?