For loop for lines
<html> <head> <script language="JavaScript"> <!-- function testLoop() { var String1 = '<hr align="center" width='; document.open(); for (var size = 5; size <= 100; size+=5) document.writeln(String1 + size + '%">'); document.close(); } //--> </script> </head> <body> <form> <input type="button" value="Test the loop" onClick="testLoop()"> </form> </body> </html>