A collection of reusable HTML, CSS, and JavaScript components in a single file. This project is meant to help beginners and contributors build, share, and explore simple UI elements and snippets.
This repository is designed for learners and open-source enthusiasts to contribute their custom HTML/CSS/JS elements (like buttons, cards, forms, modals, etc.) in one place.
It’s beginner-friendly and encourages experimentation.
We welcome contributions from everyone! Follow these steps:
-
Fork the repository to your GitHub account.
-
Clone your fork to your local machine:
git clone https://github.com/<your-username>/HTML-Element-Collection.git cd HTML-Element-Collection
-
Add your component inside the main file (
index.html).- Each element should include HTML structure, styling with CSS, and functionality with JavaScript if needed.
- Comment your code with your name or GitHub handle so others can recognize contributors.
-
Commit your changes:
git add . git commit -m "Added [your component name]"
-
Push to your fork:
git push origin main
-
Create a Pull Request (PR) from your forked repository back to this repo.
Here’s a sample card component:
<!-- Example: Simple Card Component by @username -->
<div class="card">
<h3>Card Title</h3>
<p>This is a sample card component contributed to the collection.</p>
<button>Read More</button>
</div>
<style>
.card {
border: 1px solid #ddd;
padding: 15px;
border-radius: 8px;
max-width: 250px;
}
.card button {
background-color: #007acc;
color: white;
border: none;
padding: 8px 12px;
border-radius: 4px;
cursor: pointer;
}
.card button:hover {
background-color: #005f99;
}
</style>- Keep your code simple and readable.
- Avoid duplicate components (check existing ones before adding).
- Make sure your component works independently.
- Respect and follow the Code of Conduct (if added).
(Optionally add screenshots here to showcase elements.)
This project is licensed under the MIT License. See the LICENSE file for details.