document.getElementById("myElement").style.cssText = `
display: block;
position: absolute;
`;
//Remeber the quotation marks should be template literal ones
//If you created the style value as a variable,
//you can use template literal like display: ${myDisplay}