This is a simple weather application built using HTML, CSS, and JavaScript. It fetches real-time weather data from the OpenWeatherMap API and displays the current weather conditions and hourly forecasts for a specified city.
- City Input: Allows users to enter a city name.
- Real-time Weather Data: Displays the current temperature, weather description, and weather icon.
- Hourly Forecast: Shows the temperature and weather conditions for the next 8 hours.
- Error Handling: Provides informative messages if the city is not found or if there are issues fetching data.
- HTML: Structure of the application.
- CSS: Styling and layout.
- JavaScript: Handles API calls, data processing, and dynamic updates.
- OpenWeatherMap API: Provides weather data.
- Weather Icons: Used for weather icons.
-
Clone the repository:
git clone <repository-url>
-
Open
index.htmlin your web browser. -
Enter a city name in the input field and click the "Search" button.
-
View the current weather and hourly forecast.
index.html: Contains the HTML structure of the application.style.css: Contains the CSS styles for the application.script.js: Contains the JavaScript code for fetching and displaying weather data.
This application uses the OpenWeatherMap API. The API key is hardcoded in the script.js file.
- Add more detailed weather information (e.g., humidity, wind speed).
- Implement a location search feature.
- Improve the user interface.
- Add a settings menu for units (Celsius/Fahrenheit).