How do you make a submit button in HTML5?

ma11hew28 picture ma11hew28 · Nov 10, 2010 · Viewed 48.1k times · Source

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>?

Answer

Gert Grenander picture Gert Grenander · Nov 10, 2010
<button type="submit">Click me</button>

W3C and MDN has more information.