Home > Web Front-end > Front-end Q&A > How to set button in html

How to set button in html

藏色散人
Release: 2023-01-04 09:35:34
Original
6421 people have browsed it

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template