How do I append HTML after a form title? This is the output I want:

&lt;label&gt;Name&lt;/label&gt;&lt;span&gt;!&lt;/span&gt;


The only way I can think of is to concatenate my HTML to the form title value

'#title' =&gt; t('Name') . '&lt;span&gt;!&lt;/span&gt;',


This kind of works, but is ugly: the output is:

&lt;label&gt;Name&lt;span&gt;!&lt;/span&gt;&lt;/label&gt;


The #suffix property won't do because it adds my HTML outside of the form element's wrapping div.

Any ideas. Thanks.
You shouldn't concatenate the result of the t() function, it should rather be built up as a single string:

'#title' =&gt; t('Name &lt;span&gt;!&lt;/span&gt;'),


Other than that, you're already doing this about the cleanest way possible. Other approaches would involve post-processing the form element(s) to render their title in a different way than standard. I imagine that would end up being more trouble than it's worth unless you wanted to do it globally for every element in every form in the site.