How can I apply some value with HTML tags to a form element? I've assigned some value with HTML tags to a form element, say the element is called name.

When it returns the form, it exactly prints the value along with the HTML. What I want in return instead, is the style applied to the text.

In this what I'm trying to do is hook_form_FORMID_alter().
This is the page where comments are listed(admin/content/comment). In this, for each comment I'm showing the subject comment and author etc. Also a collapsible tree for editing the comment with pre filled values in the fields.

$form['name'] = '&lt;b&gt;Fazeela&lt;/b&gt;'
return $form;
Use css.


Example:

If your $form['name'] is a div with an id wrapper,

&lt;div id="wrapper"&gt;Fazeela&lt;/div&gt;


Include a css file in your module file, particularly in hook_init function.

function NameOfYourModule_init(){
   drupal_add_css(drupal_get_path("module", "NameOfYourModule") . "/mycss.css"); 
}


mycss.css file

#wrapper{
    font-weight: bold;
}