A simple web application that fetches and displays a random "useless fact" from a public API. This project demonstrates basic HTML, CSS, and JavaScript, with a focus on integrating with a third-party API.
- Displays a new random fact with each button click.
- User-friendly interface.
- Handles API loading states and basic error messages.
- HTML5
- CSS3
- JavaScript (ES6+)
- Useless Facts API
- Clone this repository:
git clone https://github.com/mattboily/random-fact-generator.git - Navigate to the project directory:
cd random-fact-generator - Open
index.htmlin your web browser.
https://mattboily.github.io/random-fact-generator/
This project was a great introduction to:
- Setting up a basic web project.
- Making asynchronous HTTP requests using the
fetchAPI. - Handling JSON data.
- DOM manipulation with JavaScript.
- Deploying a static site with GitHub Pages.