I don't believe it's bad practice as such, it's certainly very convenient and is exactly what you would do in an xml environment. More important is the nature of the information you hold in those custom attributes and how they are used within your code.
A nicer alternative would be to hold the data in different way for example the data() functionality of jQuery.