A simple weather web app that fetches real-time weather data using the OpenWeatherMap API.
The app allows users to search for a city and displays temperature, humidity, wind speed, weather description, and background image related to the city.
- Search weather by city name
- Displays:
- π‘ Temperature (Β°C)
- π« Weather description
- π§ Humidity
- π¬ Wind speed
- Dynamic background image from Unsplash API
- Responsive UI with a search bar
- HTML5
- CSS3
- JavaScript (ES6)
- OpenWeatherMap API
- Unsplash Random Images
βββ index.html # Main HTML structure βββ style.css # Stylesheet βββ app.js # JavaScript functionality βββ README.md # Project documentation
yaml Copy code
git clone https://github.com/your-username/weather-website.git
cd weather-website- Get your OpenWeatherMap API key Sign up at OpenWeatherMap
Copy your API key
- Add your API key in app.js js
let weather = {
apiKey: "YOUR_API_KEY_HERE",
...
};
- Run the project Simply open index.html in your browser.
πΈ Preview
β‘ Example Queries London
New York
Tokyo
Delhi
π Troubleshooting If you see "No weather found.", check:
The spelling of the city name
Your API key validity
Internet connection