A responsive weather application built with HTML, CSS, and JavaScript that provides real-time weather information using the WeatherAPI. Users can search for any city or use their current location to view the current weather and the next 24-hour forecast.
🌐 Live Website: LIVE
- 🔍 Search weather by city name
- 📍 Get weather using current location
- 🌡️ Current temperature and weather condition
- 🕒 24-hour weather forecast
- 🌦️ Dynamic weather icons based on weather conditions
- 📱 Responsive design
- ❌ Error handling for invalid locations or failed requests
- HTML5
- CSS3
- JavaScript (ES6+)
- WeatherAPI
- Fetch API
- Geolocation API
Weather-App/
│── icons/
│── index.html
│── style.css
│── script.js
└── README.md
- Clone the repository:
git clone https://github.com/your-username/weather-app.git- Navigate to the project folder:
cd weather-app-
Get a free API key from WeatherAPI.
-
Open
script.jsand replace:
const API_KEY = "";with
const API_KEY = "YOUR_API_KEY";- Open
index.htmlin your browser.
Add screenshots or a GIF of the application here.
While building this project, I practiced:
- DOM Manipulation
- Event Listeners
- Fetch API
- Async/Await
- JavaScript Array Methods (
map()andfilter()) - Error Handling with
try...catch - Working with REST APIs
- Geolocation API
Dhruv Pandey
GitHub: https://github.com/atetoon