Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>The Element Object</h1>
<h2>The id Property</h2>
<button onclick="myFunction()">Change</button>
<p id="myP">Click "Change" to change my font size.</p>
<script>
function myFunction() {
  const element = document.getElementById("myP");
  element.style.fontSize = "24px";
}
</script>
</body>
</html>