There is a small hmtml code attached to variable templ. Inside variable templ there is a div with id note-remarks I want to add list of span text something like 

```
<small class="note-tag">tag1</small>

```

inside it. Where tag1 is dynamic text. These dynamic text is currently alerted as l. Selected tags are the tags selected while making comment.

```
var tmpl = `<div class="container mb-1">
                {{date('m/d/Y')}}
                <span class="text-gray pull-right">{{Auth::user()->name}}</span>
                <p class="text-gray">
                    <strong>COMMENT</strong>
                </p>
                <div id="note-remarks">
                </div>
            </div>`;
function loadRecentNote(comment,selected_tags){
    $('#recent_note').prepend(tmpl.replace("COMMENT", comment));
    $.each(selected_tags, function( i, l ) {
      alert(l)
    });
}

```