<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.fontFamily = "Impact,Charcoal,sans-serif";
}
</script>
</body>
</html>