title: How can I specify a CSS class name declaratively in Vaadin 8?
body: <p>I want to style a component that is specified declaratively in html using css (e.g. specify the <code>class</code> attribute for the given component). I know that this is possible by using the Java API like this:</p>
  
  <pre><code>Label label = new Label("This is a test label");
  label.addStyleName("large");
  </code></pre>
  
  <p>However, I want to achieve the same effect, but with <a href="https://vaadin.com/docs/v8/framework/application/application-declarative.html" rel="nofollow noreferrer">declarative design</a>.
  I already tried to simply specify the <code>class</code> attribute in the html tag, but this has no effect:</p>
  
  <pre><code>&lt;v-label class="large"&gt;This is a test label&lt;/v-label&gt;
  </code></pre>
  
  <p>The component that is rendered in the webpage does not retain the classname <code>large</code>.</p>