Best practice of HTML DOM template in javascript Of course the when this select is comes with less options it will be better to leave it like this, and when it comes more then this it better to make it via loop.
The question is that if I should make it loop or leave it as it is ? 
which way is the best and why ?

var htmlTemplate = 
    "&lt;select class='action cycle' auto='1' value='24'&gt;" +
        "&lt;option value='6'&gt;6 hours&lt;/option&gt;" +
        "&lt;option value='12'&gt;12 hours&lt;/option&gt;" +
        "&lt;option value='24' selected=''&gt;24 hours&lt;/option&gt;" +
        "&lt;option value='48'&gt;48 hours&lt;/option&gt;" +
        "&lt;option value='72'&gt;72 hours&lt;/option&gt;" +
    "&lt;/select&gt;";


Also, in my current project I'm making 'Add' button which creates some html dom elements.
My question is if I should leave the code inside string or create it via javascript (createElement) and again, I would like to know what is the best way and why :)

var htmlTemplate = "class='target-unit' identify='blahblah'";
htmlTemplate = "&lt;div " + targetTemplate + "&gt;" +
                    "&lt;span class='target-place'&gt;" + targetPlace + "&lt;/span&gt;" +
                    "&lt;select class='action campaign'&gt;" + targetOptions + "&lt;/select&gt;" +
                    "&lt;label input-label='' class='target-limit'&gt;5000&lt;/label&gt;" +
                    "&lt;select class='action cycle' auto='1' value='24'&gt;" +
                    "&lt;option value='6'&gt;6 hours&lt;/option&gt;" +
                    "&lt;option value='12'&gt;12 hours&lt;/option&gt;" +
                    "&lt;option value='24' selected=''&gt;24 hours&lt;/option&gt;" +
                    "&lt;option value='48'&gt;48 hours&lt;/option&gt;" +
                    "&lt;option value='72'&gt;72 hours&lt;/option&gt;" +
                    "&lt;/select&gt;" +
                    "&lt;button class='action small button-icon add flr no-title' identify='target-add'&gt;&lt;/button&gt;" +
                "&lt;/div&gt;";
Personally I would create loops for this, it's very unreadable at the moment and you are repeating yourself a lot. Remember the DRY rule (don't repeat yourself). Also if you do it via loops it's easier to maintain and change in the future.