title: not able to set ID's to dynamically created labels in JQUERY
body: <p>i created a label dynamically in jquery. I need to assign certain styles to that label. Here i tried to assign a unique ID to that label and apply styles. But it's not working.</p>
  
  <p>my code is;</p>
  
  <p><strong>Javascript</strong></p>
  
  <pre><code>var lbl = $("&lt;label&gt;").text('Welcome');
  lbl.id = "test";
  $("#sec").append(lbl);
  </code></pre>
  
  <p><strong>CSS</strong>  </p>
  
  <pre><code>#test
  {
    color:red;
    font-size:20px;
  }
  </code></pre>
  
  <p>how to assign ID's to dynamic labels?</p>