I want to style some part of my paragraph before appending it to html page. I have tried some methods but they are not working. see commented syntax. I want to style the word Description What is the proper way of doing this? Thank You.
const detailsDiv = document.getElementById("details");
var articleDecs = document.createElement("p");
articleDecs.setAttribute("class", "productDesc");
var str = "Description: ";
//var str2 = str.bold();
//var str3 = "<b>Description: </b>" ;
articleDecs.innerText = "Description: " +catalogArray[pos].desc;
//articleDecs.innerText = str2 +catalogArray[pos].desc;
//articleDecs.innerText = str3 "+catalogArray[pos].desc;
console.log(articleDecs);
detailsDiv.appendChild(articleDecs);
<div id="details"></div>
var str3 = "<b>Description: </b" > ;is invalid