Tip Calculator Project
In this project, I built a tip calculator using HTML, CSS, JavaScript and Bootstrap. The goal was to create a program that allows users to input their bill amount and select a tip percentage to calculate the total bill including the tip.
The process involved:
- Setting Up Variables: I defined variables for the pre-tip total and the tip percentage.
- Performing Calculations: Using these variables, I calculated the total bill amount by adding the tip to the pre-tip total.
- Displaying Results: I displayed the total bill and tip amount on the page, ensuring the amounts are rounded to two decimal places for clarity.
Moreover, I paid attention to accessibility, implementing features to make the calculator usable for everyone. This includes using semantic HTML and ARIA attributes where necessary to ensure that the application is accessible to users with disabilities, such as those relying on screen readers.
This project was a nice exercise in combining HTML for layout, CSS and Bootstrap for styling, and JavaScript for dynamic calculations and form validation, resulting in a useful web application.