Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you make a submit button in HTML5?

Given W3C's HTML5 spec for the submit button:

A button element must have both a start tag and an end tag.

what's an example of a submit button with a start and end tag?

  1. <button type="submit">
  2. <button type="submit" />
  3. <button type="submit" ></button>
  4. 2 & 3
  5. None of the above

Is the answer the same for other "singleton" tags, like <input> or <img>?

like image 823
ma11hew28 Avatar asked Nov 09 '10 23:11

ma11hew28


People also ask

How do you submit a button?

Submit button automatically submits a form on click. Using HTML forms, you can easily take user input. The <form> tag is used to get user input, by adding the form elements. Different types of form elements include text input, radio button input, submit button, etc.

What Is syntax to create submit button?

The <input type="submit"> defines a submit button which submits all form values to a form-handler. The form-handler is typically a server page with a script for processing the input data. The form-handler is specified in the form's action attribute.

How do I add a submit button to my website?

In HTML, linking submit buttons using the Anchor Tag is a simple and dependable approach. Write/Declare a Submit button between the Anchor tag's Starting and Closing tags. Give a Path where you wish to link your Submit Button by using the href property of the Anchor element.


1 Answers

<button type="submit">Click me</button> 

W3C and MDN has more information.

like image 109
Gert Grenander Avatar answered Sep 22 '22 13:09

Gert Grenander