Custom attributes in HTML correctly

When building web applications, it’s often quite useful to be able to have custom attributes on HTML tags. Custom attributes can be added to any HTML tag but there is a correct way to handle it and still maintain valid HTML. Doing this the correct way also makes it quite easy to make use of those custom attributes in Javascript code.

Photo by Christopher Robin Ebbinghaus on Unsplash