A basic calculator built using HTML, CSS, JavaScript, and Bootstrap.
This project focuses on clean UI, accurate arithmetic operations, accessibility, and responsive design.
- Basic arithmetic operations
- Addition (
+) - Subtraction (
−) - Multiplication (
×) - Division (
÷)
- Addition (
- Two-way display
- Top: input expression
- Bottom: calculated result
- Premium dark UI
- Subtle gradients
- Depth and button feedback
- Keyboard support
- Numbers, operators, Enter, Backspace, Escape
- Accessible
- ARIA roles and live regions
- Screen-reader friendly output
- Responsive design
- Built using Bootstrap grid and utilities
- HTML5 – semantic structure
- CSS3 – custom styling and premium UI effects
- JavaScript (Vanilla) – calculator logic and keyboard handling
- Bootstrap 5 – responsive layout and UI consistency
- The calculator displays user input and results on separate display lines for clarity.
- Multiplication and division are shown as
×and÷in the UI, while internally handled safely using JavaScript operators. - User interactions work seamlessly via both mouse clicks and keyboard input.
- Input validation prevents invalid expressions and handles errors gracefully.
- Download or clone the repository
- Open
index.htmlin any modern web browser
(No build tools or server required)
- No external calculation libraries to keep logic simple and transparent.
- Bootstrap only for layout, not for business logic.
- Two-way display improves readability compared to single-line calculators.
- Premium dark theme chosen for better contrast and modern appearance.
Developed as part of an internship task, with emphasis on:
- Clean code structure
- Usable UI/UX
- Accessibility and responsiveness
This project is for educational and demonstration purposes.