Basic HTML


Basic blank page
Meta Codes
Horizontal Lines
Hyperlinks
Images
Marquee
Refresh
Styles
Time - Digital Clock
Time / Date - Clock Face
Countdown Clock / Timer


Time/Date - Clock Face

Copy and paste the code between the <body> and </body> markups. Edit the red text as required. 

  • Change the "hours+minutes+seconds+ap" text as required to change the format of the clock output.
  • Remove the -12 for a 24 hour clock.
  • ap represents AM or PM for use with 12 hour clock time. You may wish to remove it when using a 24 hour clock.

This sample code is taken from a sample Microsoft help file. It uses the users own PC clock to tell the time.


The following parameters are at the top of the script. Adjust the values shown in red below to customize the clock to suit your own requirements.

dCol = '000099'; //date colour
fCol = '668099'; //face colour
sCol = 'FF0000'; //seconds colour
mCol = '000000'; //minutes colour
hCol = '000000'; //hours colour
ClockHeight = 40;
ClockWidth=40;
ClockFromMouseY=0;
ClockFromMouseX=100;



You can submit your code fragments to us for publication using the feedback page.

Copyright Bygraph Limited, UK