English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Is their a specific html code to do this???

2007-03-20 05:37:01 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

Most readers will understand the "^" symbol.

Ex. 2^2 = 2 squared

In HTML you can superscript the exponent:

22

Yahoo prevents this from being displayed correctly; however, if you include it in an HTML file, you'll be able to see the an actual smaller font exponent.

2007-03-20 06:24:18 · answer #1 · answered by strayinma 4 · 0 0

To do this you need to have a programming language. HTML, by itself, is a display language and there is no calculation or intelligence available to it.

If you have a server side scripting technology such as ASP or PHP you could do it with a single line.

You could also do this with javascript on the client side. Here is a snippet of JavaScript that you could insert exactly where you want the squared number to show:



Wherever you put this in, it would print out the multiple of 7 * 7 or 7 squared.

Here is a good reference for javascript math: http://docs.sun.com/source/816-6408-10/math.htm

If you wanted to get the 7 squared, you could also use the function pow and it would work like so:

2007-03-20 05:53:47 · answer #2 · answered by Clint P 2 · 0 0

Use this symbol ^

2007-03-20 05:49:12 · answer #3 · answered by Sachin B 2 · 0 0

fedest.com, questions and answers