-1

I made a function to increase font size by click on button.

    <body>
    <p id="demo">1. New Journey Started, Best of Luck.</p>
    <button type="button" onclick="myFunction()">Click me</button>
    <script>
        function myFunction() {
            document.getElementById("demo").style.fontsize = "x-large";
        }
    </script>
</body>

Please help to me to know what's the problem?

1 Answers1

1

Font size should be in camel case:

function myFunction() {
            document.getElementById("demo").style.fontSize = "x-large";
        }
JohnS
  • 87
  • 1
  • 4