document.getElementById("your element").style.fontSize = "20%"
// get reference to element using its ID or querySelector
const myElement = document.getElementById("elementID");
// pass element reference and getPropertyValue of font-size
const size = window.getComputedStyle(myElement).getPropertyValue("font-size");
document.getElementById("foo").style.fontSize = "18"
document.getElementById("demo").style.fontSize = "14px";
let selected = document.GetElementById('selected');
selected.setAttribute(
"style",
`font-weight:bold; font-size: 20px; color: ${newColor}; background-color: lightgray;`
);
const fontSize = window.getComputedStyle(document.getElementById("yourFontSizeinCSS")).fontSize;
const size = parseFloat(fontSize);
document.getElementById("one").style.fontSize = `${size * 3}px`;
const element = document.querySelector("#id");
const size = window.getComputedStyle(element).getPropertyValue("font-size");