If I am writing an application where I can dictate that the users must have a modern browser with javascript enabled, what is the benefit of using the html tag.
For instance if I submit all of my "forms" by doing something like this, but I don't actually have any form tags in my html. I just build a datalist to pass through the data parameter of the $.ajax call
$('#submit_form').click(function(){
var datalist='foo='+$('#foo').val();
$.ajax({
// ajax json here
});
}
Why would I use the form tag in my html code? I am sure there is probably a good reason, but a friend asked me the other day and I couldn't give him a good reason why it was needed.
that and also you can use the html 5 attribute such as "required" (not submitting the form if this field empty)
<input type="text" required = required />
or <input type="email"/>
(make sure its a valid email address). without a form this attribute will not work. with this code you save a bunch of code in JS.
hope i helped.