##HTML:
Update :
I was wrong about this one - stackoverflow.com/a/3558200/567864
Instead of :
<input id="btn7" type="Button" value=" 7 " onclick="NumPressed(7)">
Use :
<input id="btn7" type="Button" value=" 7 " onclick="NumPressed(7)" />
Table shouldn't be used for layout, they are hard to maintain and style, use div instead.
Semantically speaking, the table tag is meant for listing tabular data. It is not optimized to build structure.
Maintain the same naming style:
Here you did upper case for the tag name:
<FORM name="Keypad" action="">Here you capitalize
typevalue :<td><input id="btn1" type="Button" value=" 1 " onclick="NumPressed(1)"></td>Here you used camel case :
<td colspan="2"><input id="btnC" type="Button" value=" C "onclick="Clear()"></td>But here you didn't for the id :
<input id="btnequals" type="Button" value=" = " onclick="Operation('=')">
Verify it for correctness on http://validator.w3.org/#validate_by_input
##CSS:
Bad syntax :
background-color: #202020 ;n
That n at the end was it intended? doesn't look valid to me.
Your gradient on input[type="button"] looks weird ... same color at the start and at the end with the background on the same color. That is not a gradient at all.
You used the same declaration twice :
input[type="button"]{
Namespace your style - In case you want to add this to a bigger page your style may affect more than you intended.
###JavaScript:
You shouldn't use an empty if with an else just to reverse it.
if (FlagNewNum && PendingOp != "=");
else
{
Your functions are meaningless if taken apart, you should consider grouping them in an namespace, object or model. Also being global scoped may not go well within a larger page.
Use a standard naming convention : http://en.wikipedia.org/wiki/Naming_convention_%28programming%29 reduce the effort needed to read and understand source code by others and enhances source code appearance.
User Experience:
When it comes to calculators, one can expect to be able to enter values by keyboard as well and not just with the mouse.