Tryit Editor v1.4

<html> <head> <script type="text/javascript"> function ChangeText() { document.getElementById("p1").style.color="blue"; document.getElementById("p1").style.fontFamily="Arial"; document.getElementById("p1").style.fontSize="larger"; } </script> </head> <body> <p id="p1">Hello world!</p> <input type="button" onclick="ChangeText()" value="Click me to change text above"> </body> </html> | Your Result:
Edit the code above and click to see the result. | W3Schools.com - Try it yourself