A responsive news website built using Html,Css,Js and NewsAPI that allows users to browse the latest headlines from different categories.
-
Responsive Design: Fully responsive design that works well on both desktop and mobile devices.
-
News Fetching from API: The website fetches news articles dynamically using the NewsAPI. The API provides articles based on different queries (like "latest", "technology", "sports", etc). The fetched news includes:
- Article image
- Title
- Description
- Source (News Publisher)
- Publication date
- Clicking on a news article opens the full article in a new tab.
-
Search Functionality:
- Users can search for news articles based on keywords.
- The search input accepts queries, and pressing "Enter" or clicking the search button triggers the search.
- The search works with API calls to fetch relevant news based on the entered keyword.
-
Loading Indicator:
- A loading indicator ("Loading...") appears while fetching data from the API.
- This improves user experience by signaling that data is being fetched.
-
Simple, Clean UI with Modern Design:
- The website uses a minimalistic, modern design with clean typography, well-organized content, and a color theme based on your style (including shades of blue).
- The color palette includes a primary accent color for interactive elements and a soft color scheme for backgrounds and borders.
- HTML5
- CSS3
- JavaScript
Clone the project
git clone https://link-to-projectGo to the project directory
cd my-projectCreate a newsApi key from NewsApi website and copy it
https://newsapi.org/Now,Replace the Api key in the script.js file
const API_KEY = "<Your Api key"";Now run the website