<!DOCTYPE html> <html> <head> <script> var tsize = 10; function myfunc1() { tsize += 25; var elem = document.getElementById("para1"); elem.style.fontSize = tsize + 'px'; } </script> </head> <body onload="setInterval('myfunc1()', 1000)"> <p id="para1">Some text here</p> </body> </html>