I am trying to use the below code to add buttons into the body of my page, the buttons appear, but none of the attributes display, it is a default button with no increase in size with font size, no text displayed, and no color.
When looking at the buttons using the console I can see the attributes are there, as shown below:
<button id="btnA" innerhtml="A" value="A" text="A" font-size="14px" background-color="#4CAF50"></button>
Not sure where I am going wrong here, any ideas?
-Thanks
Everything is not an attribute, specially innerHTML.
btn.setAttribute("style","font-size:14px;background-color: #4CAF50");
btn.innerHTML = "A"