Can I just make up attributes on my HTML tags?

In HTML5, yes. You just have to prefix them with data-. See the spec.

Of course, this implies you should be using the HTML5 doctype (<!doctype html>), even though browsers don’t care.

Leave a Comment