This project is a simple webpage that fetches and displays a random cat picture from The Cat API when a button is clicked.
- Fetches random cat pictures from The Cat API.
- Displays the cat picture on the webpage.
- Button to load a new cat picture on demand.
- Built with HTML, CSS, and JavaScript.
- Responsive layout using Bootstrap.
-
Clone the repository:
$ git clone https://github.com/yourusername/random-cat-picture-generator.git -
Navigate to the project directory:
$ cd random-cat-picture-generator -
Open the index.html file in your browser:
$ open index.html
Alternatively, you can host the project locally using a tool like Live Server in VSCode.
- The webpage contains a button labeled “Give me a Cat picture!” and an empty image placeholder.
- When the button is clicked, a request is sent to The Cat API.
- A random cat picture URL is fetched and displayed inside the image element.
- You can click the button multiple times to load new random cat images.
Bootstrap 5.1 for responsive layout and styling. https://getbootstrap.com/
The Cat API https://thecatapi.com/
This project is open-source and available under the MIT License.