Prev Demo
Javascript With Style Attributes
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Style attributes</title> </head> <body> <h1>TechFunda</h1> <p id="demo">It changes the fontsize of the text.</p> <script> function mystyle() { document.getElementById("demo").style.fontSize = "25px"; } </script> <button type="button" onclick="mystyle()">Click Me!</button> </body> </html>
Note: We DO NOT save your trial code in our database.
Output