body{ background:#f5f5f5; font:bold 12px Arial, Helvetica, sans-serif; margin:0; padding:0; min-width:960px; color:#000; } a { text-decoration:none; color:darkblue; } h1 { font: 4em normal Arial, Helvetica, sans-serif; padding: 20px; margin: 0; text-align:center; } h1 small{ font: 0.2em normal Arial, Helvetica, sans-serif; text-transform:uppercase; letter-spacing: 0.2em; line-height: 5em; display: block; } h2 { font-weight:700; color:#bbb; font-size:20px; } h2, p { margin-bottom:10px; }
<script type="text/javascript"> $(document).ready(function() { // Create two variable with the names of the months and days in an array var monthNames = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ]; var dayNames= ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"] // Create a newDate() object var newDate = new Date(); // Extract the current date from Date object newDate.setDate(newDate.getDate()); // Output the day, date, month and year $('#Date').html(dayNames[newDate.getDay()] + " " + newDate.getDate() + ' ' + monthNames[newDate.getMonth()] + ' ' + newDate.getFullYear()); setInterval( function() { // Create a newDate() object and extract the seconds of the current time on the visitor's var seconds = new Date().getSeconds(); // Add a leading zero to seconds value $("#sec").html(( seconds < 10 ? "0" : "" ) + seconds); },1000); setInterval( function() { // Create a newDate() object and extract the minutes of the current time on the visitor's var minutes = new Date().getMinutes(); // Add a leading zero to the minutes value $("#min").html(( minutes < 10 ? "0" : "" ) + minutes); },1000); setInterval( function() { // Create a newDate() object and extract the hours of the current time on the visitor's var hours = new Date().getHours(); // Add a leading zero to the hours value $("#hours").html(( hours < 10 ? "0" : "" ) + hours); }, 1000); }); </script>