Click Me!" statement in the body."/> Click Me!" statement in the body.">

Home  >  Article  >  Web Front-end  >  How to set button in html

How to set button in html

藏色散人
藏色散人Original
2021-04-09 10:32:166340browse

htmlHow to set button: First create an HTML sample file; then set the "" statement in the body.

How to set button in html

The operating environment of this article: Windows7 system, HTML5&&CSS3 version, Dell G3 computer.

Inside the button element, you can place content, such as text or images. This is the difference between this element and buttons created using input elements.

tags is the content of the button, including any acceptable body content, such as text or multimedia content. For example, we can include an image and associated text in a button and use them to create an attractive markup image in the button.

The only prohibited element is the image map, as its mouse and keyboard-sensitive actions interfere with the behavior of the form buttons.

Always specify the type attribute for buttons. The default type in Internet Explorer is "button", while the default in other browsers (including the W3C specification) is "submit".

Example:

Tagged a button:

<html>
<body>

<button type="button">Click Me!</button>

</body>
</html>

Effect:

How to set button in html

##【Recommended learning:

HTML video tutorial

The above is the detailed content of How to set button in html. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn