answersLogoWhite

0

HTML is a static language, you cannot do any math using only HTML. To do math, you need a scripting language such as JavaScript. Try this code:

<script type="text/javascript">

document.write((2+3)*2);

</script>

put this in your HTML page and it should display as 10

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

Is there any way to declare and use variables in HTML As in being able to type a number into a text box and having html calculate the answer?

No. You can use Javascript for client side calculations


What are the advantages of HTML forms?

The most commonly problem with HTML forms is their dependency on scripting languages. HTML forms are reliant on script to accomplish many common tasks such as marking controls as required, performing validations and calculations, displaying error messages, and managing dynamic layout. This dependency results in complex documents, which are expensive and time-consuming to maintain.


Html vs traditional programming language?

HTML is not a programming language so it is very different to programming languages. HTML is really just for formatting text and laying out pages, what we call marking up a page. So it is a Markup Language. It can't really do anything interactive with you. Web pages that can do things normally have programming code built into them, with languages like Javascript. HTML can't even do simple things like calculations. Calculations are fundamental to programming languages, as are many other things like: making decisions, repeating instructions, storing data, processing data, and many other things. HTML can't do any of those things. HTML borrows some things from programming, like the facility to use comments, encouraging people to lay out their code properly and the use of simple English-like commands. If people have learned how to use HTML, it is still a big step up to grasp the concepts of programming. There are also very many programming languages, many of them specialising in doing certain kinds of jobs. Many are very complicated and technical and can be quite cryptic, making them hard to learn. They can also be very strict in how you have to do things, and even simple errors can stop your program working. Programming can be very frustrating because of that. You need to learn and understand a lot more things to write programs than you need for creating HTML pages. HTML is a lot less complicated. You can even make some basic mistakes and your page will still work. HTML can be learned very simply and quickly. It is very easy to show someone how to create a simple web page with HTML. So there is a very big difference between HTML and programming languages.


Is HTML protocol or not?

HTML is a protocol


What helps you create an HTML file by inserting HTML codes for you as you work?

Special HTML editor programs, like Dreamweaver.Special HTML editor programs, like Dreamweaver.Special HTML editor programs, like Dreamweaver.Special HTML editor programs, like Dreamweaver.Special HTML editor programs, like Dreamweaver.Special HTML editor programs, like Dreamweaver.Special HTML editor programs, like Dreamweaver.Special HTML editor programs, like Dreamweaver.Special HTML editor programs, like Dreamweaver.Special HTML editor programs, like Dreamweaver.Special HTML editor programs, like Dreamweaver.

Related Questions

Is there any way to declare and use variables in HTML As in being able to type a number into a text box and having html calculate the answer?

No. You can use Javascript for client side calculations


What are the advantages of HTML forms?

The most commonly problem with HTML forms is their dependency on scripting languages. HTML forms are reliant on script to accomplish many common tasks such as marking controls as required, performing validations and calculations, displaying error messages, and managing dynamic layout. This dependency results in complex documents, which are expensive and time-consuming to maintain.


What is the Capitalized Value of social security benefits?

The Urban Institute did the calculations in 2004 and the figures are in http://www.urban.org/900746_USAToday/900746_Tables.xls Read explanations in http://www.urban.org/publications/900746.html


Differentiate HTML tag from an HTML documents?

HTML tags are used to delimit HTML elements inside an HTML document.


How do you prepare an HTML?

The basic HTML base to a HTML website is &lt;HTML&gt; &lt;title&gt; &lt;/title&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;/body&gt; &lt;/HTML&gt;


What is the name of the program in Microsoft Office that performs calculations?

Excel is the main one that is for calculations, but you can do calculations in other ones like Access and even in Word.Excel is the main one that is for calculations, but you can do calculations in other ones like Access and even in Word.Excel is the main one that is for calculations, but you can do calculations in other ones like Access and even in Word.Excel is the main one that is for calculations, but you can do calculations in other ones like Access and even in Word.Excel is the main one that is for calculations, but you can do calculations in other ones like Access and even in Word.Excel is the main one that is for calculations, but you can do calculations in other ones like Access and even in Word.Excel is the main one that is for calculations, but you can do calculations in other ones like Access and even in Word.Excel is the main one that is for calculations, but you can do calculations in other ones like Access and even in Word.Excel is the main one that is for calculations, but you can do calculations in other ones like Access and even in Word.Excel is the main one that is for calculations, but you can do calculations in other ones like Access and even in Word.Excel is the main one that is for calculations, but you can do calculations in other ones like Access and even in Word.


Html vs traditional programming language?

HTML is not a programming language so it is very different to programming languages. HTML is really just for formatting text and laying out pages, what we call marking up a page. So it is a Markup Language. It can't really do anything interactive with you. Web pages that can do things normally have programming code built into them, with languages like Javascript. HTML can't even do simple things like calculations. Calculations are fundamental to programming languages, as are many other things like: making decisions, repeating instructions, storing data, processing data, and many other things. HTML can't do any of those things. HTML borrows some things from programming, like the facility to use comments, encouraging people to lay out their code properly and the use of simple English-like commands. If people have learned how to use HTML, it is still a big step up to grasp the concepts of programming. There are also very many programming languages, many of them specialising in doing certain kinds of jobs. Many are very complicated and technical and can be quite cryptic, making them hard to learn. They can also be very strict in how you have to do things, and even simple errors can stop your program working. Programming can be very frustrating because of that. You need to learn and understand a lot more things to write programs than you need for creating HTML pages. HTML is a lot less complicated. You can even make some basic mistakes and your page will still work. HTML can be learned very simply and quickly. It is very easy to show someone how to create a simple web page with HTML. So there is a very big difference between HTML and programming languages.


How do you put HTML in PHP?

Its done exactly the same as when you put it in an HTML file. There are 2 ways you can do it: &lt;html&gt; &lt;?php // php stuff ?&gt; &lt;/html&gt; Or you can do it like this: &lt;?php echo "&lt;html&gt;"; // php stuff echo "&lt;/html&gt;"; ?&gt;


True or false the latest reformulated version of HTML is HTML 1.0?

This is false, the newest version of HTML is HTML 5.


Is html a replacement for xhtml?

No. HTML existed before XHTML. XHTML combines XML and HTML, so it is an advancement on HTML.


How do you cancel HTML?

To cancel or end an &lt;html&gt; tag you simply type &lt;/html&gt;.


How do you submit an HTML?

I don't understand exactly what you mean by that but if you simply save a file with the extension .HTML it will be a HTML file that you can publish online. for eg &lt;HTML&gt; &lt;body&gt; This is my HTML page &lt;/body&gt; &lt;/HTML&gt; will simply show "This is my HTML page" on your web browser hope i helped