Skip to content

Pathum-Tharaka/CodeAlpha_Age_Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Age Calculator

This is a simple Age Calculator web application that allows users to calculate their age based on their date of birth. The application is built using HTML, CSS, and JavaScript.

Screenshot

Screenshot of Age Calculator

Features

  • User-Friendly Interface: The application provides an intuitive interface to input your birthdate.
  • Age Calculation: Calculates the exact age in years, months, and days.
  • Clear Button: Allows users to reset the input fields to start a new calculation.
  • Responsive Design: The layout is responsive and adapts to different screen sizes.

Demo

You can run the application locally by opening the age.html file in your web browser.

Files

  • age.html: The main HTML file containing the structure of the Age Calculator.
  • ageStyle.css: The CSS file for styling the Age Calculator interface.
  • ageJS.js: The JavaScript file responsible for the age calculation logic and button functionalities.

Usage

  1. Open the age.html file in your web browser.
  2. Select your birth date using the dropdowns for Year, Month, and Day.
  3. Click the Calculate Age button to view your age.
  4. Use the Clear button to reset the form and start a new calculation.

Customization

Change Button Styles

You can customize the appearance of the buttons (Calculate Age and Clear) by editing the CSS classes in the ageStyle.css file:

  • .button-29: Style for the Calculate Age button.
  • .button-28: Style for the Clear button.

Adjusting the Layout

The layout of the input fields and buttons can be adjusted by modifying the CSS in the ageStyle.css file, specifically within the .input-group and .button-container classes.

JavaScript Logic

The logic for calculating the age is implemented in the ageJS.js file. You can modify the calculation logic or add new features by editing this file.

Requirements

  • A web browser that supports HTML5, CSS3, and JavaScript.

Installation

  1. Download or clone the repository to your local machine.
  2. Open the age.html file in your preferred web browser.

License

This project is open-source and available under the MIT License.

About

this is age calculator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published