How do you make a submit button in HTML5?

不打扰是莪最后的温柔 提交于 2019-12-21 06:48:26

问题


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


回答1:


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

W3C and MDN has more information.



来源:https://stackoverflow.com/questions/4139975/how-do-you-make-a-submit-button-in-html5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!