Of course I agree with the previous answer: CSS is the way to go!. The real question is though: where should you put the CSS bits?
I would strongly suggest to put it in a separate .css file, as this will ease a lot the life for other people involved in the project, and keeps the code portable to another theme, when/if the time for a restyling will come. It is pretty easy to do as each from element is generated with its own wrapping div. The function you need to use to tell drupal to use a given .css file (if you don't add your styles to an existing one) is drupal_add_css().
That said, if you still want/need/must tweak the behaviour you mentioned from the code generating the form, I would suggest you use the #prefix and #suffix properties of the $form
array. These are common to all the form elements and allow you to inject HTML directly into the rendered form (prefix before a given element, suffix after it, of course). This way you could put in the place you need both html elements such <div>
's and <span>
's and CSS via the <style type="text/css">
tag.
I want to emphasize though, that the first solution (external CSS file) is way better.
Hope this helps!