A simple and responsive Weather App built with HTML, CSS, and JavaScript that fetches real-time weather data using the OpenWeatherMap API. Users can search for any city and instantly view its current weather conditions.
- 🔍 Search weather by city name
- 🌍 Displays city and country
- 🌡️ Current temperature
- 🤗 Feels like temperature
- 🔺 Maximum & 🔻 Minimum temperature
- 💧 Humidity
- 📈 Atmospheric pressure
- 🌬️ Wind speed and direction
- ☁️ Cloud coverage
- 👀 Visibility
- 🌅 Sunrise & 🌇 Sunset timings
- 🌤️ Weather condition with dynamic weather icon
- 📱 Responsive and modern UI
- HTML5
- CSS3
- JavaScript (ES6)
- Fetch API
- OpenWeatherMap API
Weather-App/
│── index.html
│── style.css
│── app.js
└── README.md
-
Clone the repository:
git clone https://github.com/Wasayullah/Weather-app.git
-
Navigate to the project folder:
cd Weather-app -
Open
index.htmlin your browser.
This project uses the OpenWeatherMap API.
To use your own API key:
- Create a free account on OpenWeatherMap.
- Generate an API key.
- Replace the existing key in
app.js:
appid=YOUR_API_KEYAfter searching for a city, the application displays:
- City & Country
- Weather Icon
- Weather Condition
- Temperature Details
- Humidity
- Pressure
- Wind Information
- Cloud Coverage
- Visibility
- Sunrise & Sunset Times
- Working with APIs
- Fetching data using the Fetch API
- Handling JSON responses
- DOM Manipulation
- Error handling in JavaScript
- Building responsive user interfaces
Contributions, suggestions, and improvements are welcome. Feel free to fork this repository and submit a pull request.
This project is open-source and available under the MIT License.