Is it possible to have only a submit button in html form?

Pretty simple question: is it ok to have a form in html, for example,

<form class="spacer" action="" method="post"> <input class="submit" type="submit" value="Submit" /> </form> 

I searched on google but didn't find anything?

+6
source share
1 answer

Yes it is.

There is no requirement that a <form> contain any elements, <input> or otherwise. (However, most useful forms usually contain a "submit" input and other relevant elements ...)

Happy coding.

+5
source

Source: https://habr.com/ru/post/900991/


All Articles