Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To change HTML span classes to @data-id, you need to modify the HTML code as follows:

original code:

<span class="my-class">Hello World!</span>

modified code with @data-id:

<span data-id="my-class">Hello World!</span>

In this case, the "class" attribute has been replaced by "data-id" attribute, and the original class name "my-class" has been moved to the value of the "data-id" attribute.