 <p>To use it like regular HTML, you got to think in regular HTML!</p> <p><strong>Lets take your case as example :</strong></p> <pre><code>&lt;ui:style&gt; .redborder { border: 1px solid red; } ... &lt;/ui:style&gt; ... &lt;div class="{style.redborder}"&gt; &lt;!--Notice I used class instead of styleName--&gt; &lt;g:Label&gt;Hello,&lt;/g:Label&gt; &lt;g:Button ui:field="button" /&gt; &lt;/div&gt; .... </code></pre> <p>So just use "class" attribute instead of "styleName".</p>