Assigning css style in type script using setAttribute
I am trying to assign element's attributes in typescript using setAttribute like this w3school example Here is my JavaScript: const p = document.createElement('p'); p.setAttribute('class', 'demoClass'); p.innerText = 'Hello'; and .css: .demoClass { background-color: #00ffff !important; } But this way it…