cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

  <title>Displaying Times and Dates</title>
  <link <link href="https://fonts.googleapis.com/css?family=Concert+One" rel="stylesheet"><!-- concert one font-->
  <div id="wrapper">
    <div id="redBox">
              <h1><div>Current Date and Time</div></h1>
                <div id="whiteBox">
               <script type="text/javascript">
 now = new Date ();
  localtime = now.toString();//sends the current time to the local time variable
  utctime = now.toGMTString();//sends the UTC time to the utc time variable
  //document.write("<p><strong>Local time:</strong>" + localtime + "</p>");writes up "local time" on the page
  //document.write("<p><strong>UTC time:</strong> " + utctime + "</p>" )writes up "utc time" on the page
  hours = now.getHours ();//goes and gets the hours for the clock
  mins = now.getMinutes ();//goes and gets the minutes for the clock
  secs = now.getSeconds ();//goes and gets the seconds for the clock
  milsecs = now.getMilliseconds ();//goes and gets the milliseconds for the clock
  document.write("<h2 id=freeflow>");//puts the clock time in bold
  document.write(hours + ":" + mins + ":" + secs + ":" + milsecs);//puts all the variables for the clock in a line

  document.write("</h2>")//closes the boldening
              </script><!--closes script-->
              h2, h1{
  font-family: 'Concert One', cursive;
    text-align: center;
  background-color: white;
  width: 400px;
  height: 70px;
  position: relative;
  margin-top: 0px;
    margin-left: 200px;

h2 {
   font-size: 50px;
  top: -40px;

   position: relative;


h1 div{
   position: relative;
  top: 10px

h1 {
   font-size: 50px;
  white-space: nowrap;
    padding-top: 0px;
  width: 800px;
    height: 300px;
     background-color: red;
    position: absolute;
    box-shadow: 14px 10px 5px 0px rgba(0,0,0,0.75);
    border-style: solid;
    border-color: black;
  margin: auto;
  width: 800px;
  height: 300px;
  position: relative;
Loading ..................