jquery css dynamic or static html elements
<p>in my website i have to create dynamic elements. </p>

<p>some elements have lots of properties like: id, class, title, href for links etc...</p>

<p>i was looking at some example on different sites and i saw 2 different way i can build my code</p>

<p><strong>#1 static</strong></p>

<pre><code>$('#mydivid').html('&lt;a href="http://domain.com/page.html" title="my link" id="linkid" class="links-green"&gt;link&lt;/a&gt;');
</code></pre>

<p><strong>#2 dynamic</strong></p>

<pre><code>var anchor = $('&lt;a /&gt;', {
  className: 'links-green',
  id: 'linkid',
  title: 'my link',
  href: 'http://domain.com/page.html',
  text: "linkk",
}).appendTo('#mydivid');
</code></pre>

<p>i would like to know this:</p>

<p>since the result is the same, which one is consider better to use as a coding standard?</p>
