Click Me! Browser support IE Firefox Chrome Safari Opera All major browsers support the Browser support IE Firefox Chrome Safari Opera All major browsers support the

Home  >  Article  >  Web Front-end  >  Introduction and example analysis of html

Introduction and example analysis of html

巴扎黑
巴扎黑Original
2017-06-16 14:36:091544browse

Example

The following code marks a button:

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

Browser support

IE

Firefox

Chrome

Safari

Opera

All major browsers support the bb9345e55eb71822850ff156dfde57c8 tag.

Important: If you use the button element in an HTML form, different browsers will submit different values. Internet Explorer will submit the text between bb9345e55eb71822850ff156dfde57c8 and de935b9c153fbe5d6ad7df96bd65d7b8, while other browsers will submit the contents of the value attribute. Please use input elements in HTML forms to create buttons.

Definition and usage

bb9345e55eb71822850ff156dfde57c8 tag defines a button.

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.

bb9345e55eb71822850ff156dfde57c8 control provides more powerful functions and richer content than 8e03557d3950bf880a2e4583affa2fab. Everything between the bb9345e55eb71822850ff156dfde57c8 and 65281c5ac262bf6d81768915a4a77ac0 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".

Differences between HTML 4.01 and HTML 5

New attributes in HTML 5: autofocus, form, formaction, formenctype, formmethod, formnovalidate and formtarget.

Tips and Notes

Note: If you use the button element in an HTML form, different browsers will submit different button values. Please use the input element to create buttons in HTML forms.

Attribute

new: New attribute in HTML5.

<button onclick="tz()">跳转</button>
<script>
function tz(){
    window.location.href=&#39;目标网址&#39;;
}
</script>

a is a hyperlink type="button" and it is obviously wrong to write it in a
It should be written like this: db670207bbab1369dc1b27b4521ffec6
html elements can use style sheets to change the size and background

The above is the detailed content of Introduction and example analysis of html

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
Previous article:Usage of html tag

Related articles

See more