An interactive todo list application built with HTML, CSS, and vanilla JavaScript to help users manage tasks efficiently.
Visit the SiteThis todo list app allows users to add, delete, and mark tasks as complete. It uses local storage to persist data across sessions.
The app is composed of a header containing the input field and add button, a main section listing the tasks, and a footer showing the number of remaining tasks.
- Add new tasks and display them in a list
- Mark tasks as completed or delete them
- Persist tasks using localStorage
- Responsive layout that adapts to mobile and desktop screens
The following snippet shows how tasks are added:
// Todo List App - JavaScript Code Example
const addButton = document.getElementById('add-btn');
addButton.addEventListener('click', () => {
const input = document.getElementById('new-task');
const task = input.value.trim();
if (task !== '') {
addTaskToList(task);
input.value = '';
}
});
function addTaskToList(task) {
const li = document.createElement('li');
li.textContent = task;
document.getElementById('task-list').appendChild(li);
}
Below is a screenshot of the code:
Implementing data persistence with local storage and ensuring the application remained responsive across devices were key challenges. Through this project I strengthened my understanding of DOM manipulation and browser storage APIs.