How do I add a span class to form item title in register form? '#title' =&gt; t('I have read and agree to the') . "&lt;b&gt;&lt;a href='/terms' target='_blank'&gt; terms of service&lt;/a&gt;&lt;/b&gt;",


How do I add a span class to the whole title, so It would end up like so:

 &lt;span class="myclass"&gt;I have read and agree to the &lt;b&gt;&lt;a href='/terms' target='_blank'&gt;terms of service&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;
You can use the following code:

'#title' =&gt; '&lt;span class="myclass"&gt;' . t('I have read and agree to the &lt;b&gt;&lt;a href="@terms" target="_blank"&gt;terms of service&lt;/a&gt;&lt;/b&gt;', array('@terms' =&gt; url('terms'))) . '&lt;/span&gt;',