Can I add a custom attribute to an HTML tag like the following?
Yes, you can, you did it in the question itself: .