HTML and CSS Reference
As you can see, two lines of code are sufficient to convert the form to an object, and include
the contents in the table , and this could be condensed to one line with relative ease.
As stated above, this is a rudimentary version of the save functionality. For instance, it does
not contain any validation; therefore you can add invalid data to the table. This, and other
minor issues, will be fixed once we start to turn this into a true web application in a couple
of chapters time.
Now that the save is implemented we can remove the three rows that were added to the
table by default each time the page was loaded, and add rows using the “Add task” and
“Save task” functionality. In addition, the rows added should be able to be deleted using
the “Delete task” option.
The tasks.html page should now contain the following markup:
<link rel="stylesheet" type="text/css" href="styles/tasks.css"
<section id="taskCreation" class="not">
<input type="text" required="required"
placeholder="Breakfast at Tiffanys" />