Drupal form custom HTML FAQ: How can I wrap some custom HTML around a Drupal form, like placing a wrapper DIV tag around my form so I can add some custom CSS to style my form/div?
You can wrap an HTML DIV tag around your Drupal form by using the form prefix and suffix properties, like this:
$form['#prefix'] = '<div class="my-form-class">';
$form['#suffix'] = '</div>';
You can do this anywhere in your Drupal form builder function, so a larger part of your Drupal form builder function might look like this: