eHow launches Android app: Get the best of eHow on the go.

How To

How to Add the Date and Time to a Web Page

Contributor
By eHow Contributing Writer
(39 Ratings)

Once you've mastered HTML and are ready to tackle the basics of JavaScript, adding this small code to your web page allows users to see the date and time!

Difficulty: Easy
Instructions
  1. Step 1

    Learn HTML. Because HTML is the key to learning JavaScript, it is essential that you have the basics down.

  2. Step 2

    Learn JavaScript. Most well-functioning date/time codes are written in JavaScript.

  3. Step 3

    Visit sites that have the date and time on their page. You can select View Source from the View menu to look at the source code for the clock.

  4. Step 4

    Go to websites that offer free scripts, such as HotStyle or Webmonkey. These sites offer step by step directions for using free scripts, as well as links to other free script sites.

  5. Step 5

    Copy and paste the script to your web page. Test it in your browser before uploading to your web page.

Tips & Warnings
  • If you use a free script, add a courtesy button or reference to the provider on your page.
  • You may need to get permission before using JavaScript from another website. When in doubt, ASK!
  • Not all browsers support scripts. Be sure to follow directions for providing alternates to scripts on your web page.

Post a Comment

Post a Comment
  • Have you done this? Click here to let us know.
I Did This

Related Ads

Internet
Virginia DeBolt,

Meet Virginia DeBolt eHow's Internet Expert.

Get Free Internet Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

Demand Media
eHow_eHow Technology and Electronics