A simple and modern Weather Application built using HTML, CSS, and JavaScript that allows users to check real-time weather information for any city using the OpenWeatherMap API.
This project demonstrates how to fetch data from an API and dynamically display it on a webpage with a clean and responsive UI.
The Weather App allows users to enter the name of a city and instantly view the current weather details including:
- Temperature
- Humidity
- Weather Condition
- Weather Icon
The application uses JavaScript Fetch API to retrieve weather data and update the interface dynamically.
- 🔎 Search weather by city name
- 🌡️ Displays current temperature
- 💧 Shows humidity level
- 🌥️ Displays weather condition with icon
- ⌨️ Enter key support for quick search
- 🎨 Clean modern UI with gradient background
- 📱 Responsive design for mobile, tablet and desktop devices.
- HTML5 – Structure of the application
- CSS3 – Styling and layout design
- JavaScript (ES6) – API integration and dynamic functionality
- OpenWeatherMap API – Real-time weather data source
Weather-App/
│
├── index.html # Main HTML file
├── style.css # Styling and layout
├── script.js # Weather API logic
└── README.md # Project documentation
- User enters a city name in the search input.
- JavaScript sends a request to the OpenWeatherMap API.
- The API returns weather data in JSON format.
- JavaScript extracts:
- Temperature
- Humidity
- Weather description
- Weather icon
- The data is displayed dynamically on the webpage.
- Clone this repository:
git clone https://github.com/Sehrish-web209/weather-app.git-
Open the project folder.
-
Replace the API key in script.js:
const apiKey = "YOUR_API_KEY_HERE";
- Open index.html in your browser.
Check out the live version of the Weather App here:
https://sehrish-web209.github.io/Weather-app/
You can record a short screen recording showing:
- Opening the Weather App
- Searching for different cities
- Displaying weather results
- Showing temperature, humidity, and weather condition
Through this project, I practiced:
- Working with APIs
- Using JavaScript Fetch API
- Handling JSON data
- Creating a responsive UI
- Building an interactive web application
Sehrish Maqbool BSIT Student at University of Chakwal Project created as part of SyntecxHub Internship.