How to Be a Better Person: A Guide to Self-Improvement
Q&A for How to Create a Calculator Using HTML
Coming soon
Search
-
QuestionDo I need to be connected to the internet?Community AnswerUsually, HTML will run in your browser, even without an internet connection.
-
QuestionHow can I get more space between the buttons?Community AnswerIf you are using HTML, you can add in the cells to add extra padding or the CSS code button.
-
QuestionWhat do I do if this code is not working for me?Community AnswerThe code will certainly work. If it is not working for you, then there might be some errors in your code. Just copy and paste the above code and follow all the procedures, and it should work fine.
-
QuestionAfter I modify the code, can I distribute it freely?Community AnswerYes. These are simple codes for educational purposes; no one owns the rights for these codes.
-
QuestionHow can I make the buttons larger?Community AnswerYou can make the button size bigger by using the CSS tag. For eg:.button { background-color: #4CAF50; border: none; color: white; padding: 15px 32px; text-align: center; font-size: 16px; margin: 4px 2px;}
-
QuestionWhat does the reset button do?Community AnswerNothing, it just redoes your whole equation, basically erasing the information you had on there.
-
QuestionIs there a way to make custom buttons on this script?Community AnswerDefinitely. You can use CSS styling or attach background images to the button. You can also use the HTML canvas tag with Javascript to create.
-
QuestionCan I create a calculator in normal notepad?Community AnswerYes, but it won't be as good as if you use other coding languages, like HTML or Javascript.
-
QuestionHow do I make the buttons larger when making a calculator using HTML? How do I add CSS or JS tags?Community AnswerTo make the button larger, we use CSS tags. In the body, type and on a new line type . In between them, type: .classname { width: 50%; padding: 50px 50px; font-size: 30px; text-align: center; } change the padding, with and font-size to whatever you want. Then go to the buttons. Inside the tag for each button, type class="classname"
-
QuestionWhat do I do if the buttons aren't working on the calculator?Community AnswerIf you copied the code, try doing it again. If you coded it, then check the input variables and the conditionals.
-
QuestionHow can I change it to read numeric keypad input?A_random_readerCommunity AnswerInsert this script tag: var x = document.getElementsByTagName('input')[16]; x.onkeydown = function(e) { y = x - 49; document.getElementsByTagName('input')[y].click(); }
-
QuestionHow can I insert a border?A_random_readerCommunity AnswerDrop a style tag into your HTML: input[type=button],input[type=submit],input[type=reset]{ border:1px solid black; }
-
QuestionCan I upload it to my website?A_random_readerCommunity AnswerYou can, as long as you have a good hosting provider that lets you upload files. A drag-and-drop website builder can't do this.
-
QuestionCan I also add operations like square root and hiw?StockriderjCommunity AnswerYes, but that would require you to code them yourself. You'd have to learn JavaScript to do that.
-
QuestionI have done that in HTML but i have a problem when I push the + and - button inside in the calculator so they are pushing more then one + inside in the calculator. What should I do?StockriderjCommunity AnswerYou may have forgotten to close one of the elements. That happens lots of times. Professional web developers close them immediately so they don't forget.
-
QuestionHow can I add functions to it for it to be able to solve a question?Community AnswerFor functions I'm assuming mathematical functions such as trigonometric functions, etc. You can implement Javascript into HTML easily, and utilise mathematical function operations such as Math.sin() found in Javascript code.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit