https://dev.webpages.dk/  
 
About CSS How to make a clock
A digital clock:

On this page you will be shown how you can add a clock to your web page.
I have added a short PHP snippet here, to let the clock show the right time, right away. If omitted the clock will not show until it updates, that will take upto a second.

<?php echo date('H:i:s'); ?>

 A digital clock

What is a webpage without a clock?
Here I show you how to have a clock showing.
You can style it the way you wan't to of course.



12:05:00

 HTML

I have put in the short PHP snip here, so the clock will show the time right when loaded. Else it would not show till it updated (after 1 second).


<span id="span" CLASS='clockstyle' />
<?php echo date('H:i:s');?>
</span>

 CSS

<style>
.clockstyle {
    background:green;
    color:yellow;
    border:1px solid;
    text-align:center;
    line-height:24px;
    width:120px;
    font-size:16px;
    font-family:monospace;
    padding:8px;
    font-weight:bold;
}
</style>

 Javascript

<script type="text/javascript">
var span = document.getElementById('span');
function time() {
  var d = new Date();
  var s = d.getSeconds();
  var m = d.getMinutes();
  var h = d.getHours();
  span.textContent = 
    ("0" + h).substr(-2) + ":" + ("0" + m).substr(-2) + ":" + ("0" + s).substr(-2);
}
setInterval(time, 1000);
</script>

 PHP

Icons made by Freepik from www.flaticon.com This page shows how you can add a digital clock to you webpages.
12:05:00