![]() |
| Itcodingbaba |
Welcome to Itcodingbaba once again, in this article we are gonna learn how to make a basic Calculator using HTML, CSS and JavaScript only, so read till the end and don't miss any code or you may get errors.
The great way to learn code is to create your own projects. If you want to become a best web creator, you must start developing projects asap. You can start by making a basic calculator, digital clock, or stopwatch as a beginner so with the time being you will learn alot, just do not give up.
You can make a basic calculator using HTML, CSS, and JavaScript. The calculator will Calculate some basic maths like calculating percentage, addition, subtraction, multiplication, and division.
Why this script?
- It's a basic calculator
- Adition subtractions, multiplication, division and more.
- Smooth and easy code
- Easy to reskin
- Friendly code
- Responsive design
How to make this code work?
You can create a one main folder that will contain the HTML, CSS and JavaScript files, Just name if whatever you want btw it would be better if you name it calculator. According to Naming convention the HTMl, CSS and JavaScript files are named index.html, Styles.css and script.js.
If you want all the code together like CSS and JavaScript in one HTML.
- Then Create an html file named anything, e.g Index.html, open it up and Create a <style> Paste All CSS code here </style> and the style should be above </head>.
- Create a <script>Paste JavaScript code here</script> and this script should be above </body>.
HTML Code:
This is the HTMl code for Stylish Basic Calculator, Create an index.html file and paste the following code there:
CSS Code:
Here's the CSS code for basic Calculator, Create a styles.css file and paste the following code there:
JavaScript Code:
At last this is the JavaScript for basic Calculator, Create a Script.js and paste the following code there:
You have successfully made the basic stylish calculator using Html CSS and JavaScript this is a beginners code of you want to modify and make it more creative you can. Keep visiting our site for more scripts. Thanks and best of luck.
.png)

