custom HTML in search form ( site/search)
You can use hook_form_alter and use render API to alter the html attributes. You can add attributes such as class, id, wrapper tags(prefix and suffix), attaching css and js file to the rendered form this way too. It would be something like this.

function yourMod_form_alter(&amp;$form, &amp;$form_state, $form_id) {
 if(strstr($form['#form_id'], 'search_form')) {
   $form['#attributes'] = array(
    'class'=&gt; array('search-form-custom-class'),
    'id' =&gt; array(),
    );
   $form['#attached'] =&gt; array(
     'css' =&gt; array( drupal_get_path('module', 'yourMod') . '/css/yourMod.css' ),
   );
   $form['#prefix'] = "&lt;div class='wrapper-for-search'&gt;";
   $form['#suffix'] ="&lt;/div&gt;";
 }
}


I advise to read more on the render API to see all attributes that you can alter.