Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<p id="demo">This is a paragraph.</p>
<button type="button" onclick="myFunction()">Set font</button>
 
<script>
function myFunction() {
  document.getElementById("demo").style.font = "italic bold 20px arial,serif";
}
</script>
</body>
</html>