1. Home
  2. Computing & Technology
  3. JavaScript

Calculator Tutorial

9. Apply Stylesheet

clr gif

To apply our newly define style to the table we need to turn off the table border and add a class attribute. While we are amending the form let's add a title at the top so that our visitors will know what the form does. The changes we need look like this:

<form name="calc" action="#"><table align="center"
border="0" class="tc">
<tr><td colspan="2" align="center">
<b>Easter<br />Calculator</b>
</td></tr>

With these changes applied our Easter Calculator now looks like the other calculators I have created:

Easter
Calculator
Year:
Day:
Month:

The only other thing that I have done with the other calculators that we have not done with this one is to add a link back to my site at the bottom of the form and to encrypt both the script and the form. This would make them harder for someone else to alter or to try to claim as their own.

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.