In my searching, I think I know the answer, it seems that any time you want to do input using HTML, it references a form.

Is this also true with buttons?

Does ALL user feed back in HTML require a form?

I am not speaking of Java Script, just HTML.

Dani AI

Generated

Good point, , and is essentially correct: for native browser-side packaging and submission of user-entered values to a server without JavaScript, the HTML <form> element is the mechanism the browser understands. Clicking links is a kind of user interaction, but it is not a general-purpose input/submit system.

That said, HTML provides many interactive controls that accept input locally without being inside a form: input, textarea, select, button, details/summary, and elements with contenteditable. Those controls change browser state and can drive CSS-only behaviors (for example toggles using :checked), but their values are not sent to the server unless they belong to a form or are handled by JavaScript. HTML5 also lets controls outside a form be associated with a form via the form attribute:

<form id="myForm" action="/submit" method="post">
  <!-- server will receive named controls that belong to this form -->
</form>

<input name="email" form="myForm">
<button type="submit" form="myForm">Send</button>

Practical notes: a <button> defaults to type="submit" (use type="button" to avoid accidental submits). contenteditable allows inline editing but does not create named form fields; its contents must be copied into a form field or handled by JS to reach the server. Bottom line: for native, server-side submission without JavaScript, use <form>. For local UI interactions or CSS-only patterns, plain HTML controls are often enough.

In my searching, I think I know the answer, it seems that any time you want to do input using HTML, it references a form.

Is this also true with buttons?

Does ALL user feed back in HTML require a form?

I am not speaking of Java Script, just HTML.

Well, some may consider clicking a hyperlink or clicking a linked image to be user interaction. But, besides that, forms are the only type of user feedback that I can identify that is available via only HTML.

Alex

That is what I was assuming, but could not word an internet search properly to get an answer.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.