π Simple To-Do List App
A beginner-friendly JavaScript To-Do List application that allows users to add and delete tasks dynamically using DOM manipulation.
π Features
Add new tasks
Prevent empty tasks from being added
Delete tasks individually
Dynamic DOM updates (no page refresh)
π οΈ Built With
HTML5
CSS3
JavaScript (Vanilla JS)
π Project Structure βββ index.html βββ index.css βββ index.js βββ README.md π How It Works
The page loads and waits for the DOM to fully initialize.
When the "Add Task" button is clicked:
The input value is collected.
If the input is empty, nothing happens.
A new
A Delete button is attached to the task.
Clicking the Delete button removes the task from the list instantly.
π» How to Run
Clone the repository:
git clone https://github.com/your-username/your-repo-name.git
Open index.html in your browser.
Thatβs it π
π What I Learned
DOMContentLoaded event
Selecting elements with getElementById
Creating elements dynamically with createElement
Event handling with addEventListener
Removing elements using .remove()
π― Future Improvements
Add task completion (strike-through)
Add local storage support
Add edit task feature
Improve UI styling