​
Hey guys welcome back, in this article you would learn how to build a simple Todo list application using Html, Css, javascript, Bootstrap, Localstorage were all items added would be stored on the browser localstorage temporary .
As you may know, A to-do list is a list of tasks you need to complete or things that you want to do and in our design [Todo List App], at first, there is a content-box that holds only the input field with some buttons and text. When you entered some characters and click on the add button, the list will be added to your tasks list and the number of the pending tasks also updated. You can also delete each list by clicking on the x icon
For reference, i ensure you eitheir copy the code below step by step or clone / download the code from my github repository Todo App Download Link
Okk enough talking let now dive in.
STEP 1
kk, Now simply use any text editor of your choice, and create a folder called CSS & JS. This 2 folders would contain both our css files and javascript files. also make sure you have boostrap downloaded for easy styling if not download it fom here.Bootstrap Link . Now create a new file called index.html. this file would hold our html files along with some external css and boostatrap link.
Easy and self explanatory right. Now let preview this in our browser
As you can see, it not looking nice enough, now let add our css to make it look good.
STEP 2: Adding Css Codes
And wala, we got this.
STEP 3: POWER OF JAVASCRIPT.
Just building the interface without any functionality is useless, so now let begin with the javascript aspect were we add the functionality of adding items to the DOM. But first let understand what the dom is and how it work.
The Document Object Model (DOM) is a programming interface for HTML and XML documents. It represents the page so that programs can change the document structure, style, and content. ... The DOM is an object-oriented representation of the web page, which can be modified with a scripting language such as JavaScript.
Now let begin with our code
having all this, let begin by running our code in browser and see how it works.
After adding items to the DOM
After Deleting item from the DOM
And that how you build a TO-DO list application in javascript.
If you enjoy this considering sharing this post to your friends.
wishing you happy coding.
​
0 Comments