I suggest you use the "
double quotes in Javascript and contain within your string the '
single quotes that will be understood by html. Or reverse.
You can also escape the quotes that you want to be in the string and not part of the separation by placing a \
before them.
Your exemple would look like this:
var tag = "<div some-attribute=\"" + attributeValue + "\">";
But the BEST SOLUTION would be to dynamically create an objet that you would add the attributes to.
var tag = document.createElement('div'); // this creates a DOM div element
tag.setAttribute("some-attribute", attributeValue); // this changes the some-attribue to the value (could use with class)
containerElement.appendChild(tag); // this appends the newly created element as html in the container
I also suggest you check out this other question with a more complete response on how to create and append elements with Javascript.