let a = document.createElement("div"); a.style.width = 400; a.style.height = 400; a.style.backgroundColor = "red"; // num : 1 a.innerText = "Hello World "; // num : 2 document.body.append(a); // After I added the "a" element in the dom . Only "num : 1" and "num : 2 " line works but width and height does not work at all . Can anyone please help me with this problemt ?