Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Purpose of HTML button?

What was the intended purpose of the HTML <input type="button"> element, taking into account that Javascript appeared after HTML (hence making me doubt that JS was the intended purpose)?

like image 214
user541686 Avatar asked Jul 13 '11 00:07

user541686


People also ask

What is the purpose of the button?

A button is a fastener that joins two pieces of fabric together by slipping through a loop or by sliding through a buttonhole.

Why buttons are used in CSS?

The CSS Buttons are used to decorate the web pages by applying the various styling properties to the button. Buttons are used for event processing and interacting with the user. From submitting a form to getting to view some information, we have to click on buttons.

How does a button work on a website?

Buttons convey a specific call to action (CTA), like “Submit” or “Pay.” Buttons tell users, “if you click me, something will happen.” Designers also use buttons to communicate with users through states, color, and text.


1 Answers

Not sure but, if I remember correctly, <input type="button"> has been added with HTML4.0. Its first draft was from 1997, so 2 years later ECMAScript. So probably is has been introduced exactly for JS purposes.

Take a look to these links provided in comments by Felix Kling:

  • reference to HTML3.2 (no type=button listed)
  • changes from HTML3 and HTML4
like image 179
Jack Avatar answered Oct 26 '22 17:10

Jack