I'm working on a project that requires me to use control templates to build up an HTML form.

The basic idea is that my HTML will just be a bunch of <div>s that are filled with data-* attributes that represent the attributes of the controls. Then, at runtime I'll have js which will come through and expand all the controls into their full implementations.

The question is, where should I put styles for individual controls? Should I put them as another attribute on the div, or should I put each control customization in css in the HTML form header? Which is cleaner? Does it even matter?