Chosing the container for a form
in hook_form:

$form['first_element'] = array(
  '#prefix' =&gt; '&lt;div class="wrapper&gt;',
  '#title' =&gt; t('First name'),
  '#type' =&gt; 'textfield',
  '#default_value' =&gt; '0',
  '#required' =&gt; TRUE,
);
$form['last_element'] = array(
  '#suffix' =&gt; '&lt;/div&gt;',
  '#title' =&gt; t('First name'),
  '#type' =&gt; 'textfield',
  '#default_value' =&gt; '0',
  '#required' =&gt; TRUE,
);
return $form