Built a News App with HTML, CSS, and JavaScript

Day-29 — News App using HTML, CSS, and JavaScript Hello Everyone: News App built with HTML, CSS, and JavaScript, which fetches and displays live news headlines from a real API. This project helped me take my JavaScript skills to the next level by learning how to integrate and handle real-time data from an external source. 🧩 Project Overview The main goal of this project was to create a simple and user-friendly interface where users can read the latest news from different categories like technology, sports, business, entertainment, and health — all dynamically fetched using JavaScript. It’s not just a static page; every headline, image, and description comes live from the News API, making it feel like a mini real-world product. ⚙️ Workflow and Logic Here’s how the app works step by step: API Connection: I used the free News API (https://newsapi.org/ ) to fetch real-time news data in JSON format. The fetch() function and async/await were used to make API calls clean and readable. Data Handling: After receiving the response, I parsed the JSON data and dynamically created HTML elements using JavaScript to show the image, title, and short description for each news item. Category Filtering: I added buttons for categories like “Sports,” “Technology,” and “Business.” When a user clicks a category, a new API call fetches the relevant news instantly. Responsive Design: Using CSS Flexbox and Grid, I made sure the layout adjusts perfectly across mobile, tablet, and desktop screens. Error Handling: I added simple error messages when the API fails to fetch data or when no news is found — ensuring a better user experience. 💡 What I Learned This project was a big step forward from simple DOM projects. I learned how to: Work with APIs and real-time JSON data Use async/await for asynchronous JavaScript Handle errors gracefully Dynamically generate content using template literals and DOM manipulation Create a responsive and professional layout using modern CSS techniques This project helped me understand how frontend and backend connect in real applications. It felt like building a real product for users rather than just a static webpage. 🚀 Technologies Used HTML5 – for structure CSS3 (Flexbox, Grid) – for layout and styling JavaScript (ES6) – for logic, API handling, and interactivity News API – for real-time content git- https://lnkd.in/gg8pTMVS I’m excited to move ahead with more real-world applications and strengthen my full-stack foundation! #JavaScript #WebDevelopment #API #Frontend #CodingJourney #29day #NewsApp #LearningByBuilding #HTML #CSS #AsyncAwait #TechLearner #100DaysOfCode Saurabh Shukla

  • graphical user interface, Word, website

To view or add a comment, sign in

Explore content categories