Alternative for innerHTML?
The recommended way is through DOM manipulation, but it can be quite verbose. For example: // <p>Hello, <b>World</b>!</p> var para = document.createElement(‘p’); para.appendChild(document.createTextNode(‘Hello, ‘)); // <b> var b = document.createElement(‘b’); b.appendChild(document.createTextNode(‘World’); para.appendChild(b); para.appendChild(document.createTextNode(‘!’)); // Do something with the para element, add it to the document, etc. EDIT In response to your edit, in order to … Read more