Welcome to the To-Do List Application repository! This project is a simple yet stylish to-do list created using HTML, CSS, and JavaScript. Itโs perfect for beginners to learn about web development concepts like DOM manipulation, localStorage, and responsive design.
- Add New Tasks: Easily add tasks to your to-do list using the input field.
- Mark as Done: Complete tasks by clicking the "done" button, which removes them from the list.
- Persistent Storage: Your tasks are saved in your browser's
localStorage
, so you wonโt lose them after refreshing the page. - Responsive Design: Works seamlessly on different devices and screen sizes.
Follow these steps to run the project:
git clone https://github.com/Innocent6303/To-do-list.git
2๏ธโฃ Open the Project
-
Navigate to the project folder.
-
Open the
index.html
file in your favorite browser OR: -
Install the Live Server extension in Visual Studio Code.
-
Right-click on the
index.html
file and selectOpen with Live Server
.
When you open the project, youโll see:
-
Header:
A title, "To-Do List" . -
Input Field:
- A blank input box with the placeholder
New Task
. - An Add button to add tasks.
- A blank input box with the placeholder
-
Task List:
- Newly added tasks appear at the top of the list.
- Each task has a done button to remove it once completed.
Adding a Task:
- Type a task into the input field.
- Click the Add button or press
Enter
. - The task is displayed in the list at the top.
Completing a Task:
- Click the done button next to a task.
- The task is removed from the list --
This project is an excellent way to learn the following:
1.DOM Manipulation:
-
Dynamically adding, removing, and updating elements on the page using JavaScript.
Example:
var todoElement = document.createElement("li"); var todoText = document.createTextNode(todo); todoElement.appendChild(todoText); listElement.appendChild(todoElement);
- Event Handling:
- Adding event listeners to buttons for user interactions.
Example:
buttonElement.onclick = addTodo;
- Local Storage:
- Saving tasks in the browserโs
localStorage
to maintain data persistence.
Example:
localStorage.setItem("list_todos", JSON.stringify(todos));
- Responsive and Functional Design:
- Designing a UI that works across devices with minimal styling and optimal functionality
To-do-list/
โ
โโโ index.html # Main HTML file
โโโ styles.css # Styling for the application
โโโ script.js # JavaScript for functionality
โโโ README.md # Documentation
- Add categories for tasks.
- Allow users to edit tasks.
- Implement a dark mode toggle.
- Add animations for adding and removing tasks.
Contributions are welcome! Feel free to:
- Fork this repository.
- Add new features or fix bugs.
- Submit a pull request.
This project is created as a fun and educational tool for beginners to:
- Learn and practice web development basics.
- Understand JavaScript concepts like
localStorage
and event handling.
โญ Star this repository if you found it fun and helpful!