<div id="out">output</div> <script> var da=document.all,t1=[8,40,0],t2=[8,50,0] function rep(){ var d,p,tot d=new Date() p=(d.getHours()-t1[0])*3600+ (d.getMinutes()-t1[1])*60+ (d.getSeconds()-t1[2]) tot=(t2[0]-t1[0])*3600+(t2[1]-t1[1])*60+(t2[2]-t1[2]) //24*60*60 da.out.innerText=Math.round(p/tot*10000)/100+"%" } setInterval(rep,500) </script> <div style="text-align: center">centered</div> <b>bold</b> <i>italic</i> <u>underlined</u>