Search code examples
htmlfontsresultset

change font in result that shows to user


I write a code to calculate sth. I want to change the font and size of words in below code

document.getElementById('total').innerHTML =" مقدار رنگ موردنیاز برابر با"+ Math.round(result)+"لیتر";

How can I do it? Can I put a border around it too?


Solution

  • document.getElementById("total").style.fontSize = "x-large";
    document.getElementById("total").style.fontFamily = "Impact,Charcoal,sans-serif";