As you will need to nest li tags in ul for it to function properly so is input for form. Form are used to submit data, and only on form tag can you have other attribute for submitting the form e.g attribute action set the url or directory the form is submitting to. Other attribute on forms is method which is the http verb for submitting the form. You will understand this better in the future.
You have to associate the input element with a form. Usually, it is done by nesting the element inside the form (making the form the nearest ancestor form element) but you can also use the form attribute.
A form-associated element can have a relationship with a form element, which is called the element’s form owner. If a form-associated element is not associated with a form element, its form owner is said to be null.
A form-associated element is, by default, associated with its nearest ancestor form element (as described below), but, if it is reassociateable, may have a form attribute specified to override this.
Probably more information then you wanted but hey there it is.