is <form> element useless ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

is <form> element useless ?

Do you think we can give up the <form> element in the future since we can use ajax, and events attribute (like onclick) ?

20th Feb 2019, 10:42 AM
Elghozi Nasreddine
Elghozi Nasreddine - avatar
4 Answers
+ 5
I personally think the answer to that is no. And I think that because form is still the easiest way to make an input option on a webpage. Cheers.
20th Feb 2019, 11:27 AM
Tony
Tony - avatar
+ 2
Form is the standard way to submit data from inputs. Data can be submitted from form using ajax too.
20th Feb 2019, 12:37 PM
Calviղ
Calviղ - avatar
+ 1
My opinion is it the best way to collect data and send them to be processed by an external script. There are lots of attributes in order to that such as method and action. So, why not? form is still useful.
20th Feb 2019, 12:07 PM
Seniru
Seniru - avatar
+ 1
the use of <form> tag is not only the matter of semantically valid HTML-markup (which is really important itself in terms of W3C standards) but also a cross-browser way to show form-elements. some browsers just won't show an element if it's not in <form> tag.
20th Feb 2019, 12:07 PM
Sergey Matvienko
Sergey Matvienko - avatar