Adding CSS styles
myElement.style.marginLeft = '2em'
If we want certain values, we can obtain these via the
.styleproperty. However, this will only give us styles that have been explicitly applied. To get the computed values, we can use,
.window.getComputedStyle(). It takes the element and returns a CSSStyleDeclaration containing all styles from the element itself as well as those inherited from its parents: