| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ko/docs/Web/HTML/Reference/Elements/button | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 7.
* Some parts of this feature may have varying levels of support.
HTML <button> . . HTML , CSS .
<button class="favorite styled" type="button">Add to favorites</button>
.styled {
border: 0;
line-height: 2.5;
padding: 0 20px;
font-size: 1rem;
text-align: center;
color: #fff;
text-shadow: 1px 1px 1px #000;
border-radius: 10px;
background-color: rgba(220, 0, 0, 1);
background-image: linear-gradient(
to top left,
rgba(0, 0, 0, 0.2),
rgba(0, 0, 0, 0.2) 30%,
rgba(0, 0, 0, 0)
);
box-shadow:
inset 2px 2px 3px rgba(255, 255, 255, 0.6),
inset -2px -2px 3px rgba(0, 0, 0, 0.6);
}
.styled:hover {
background-color: rgba(255, 0, 0, 1);
}
.styled:active {
box-shadow:
inset -2px -2px 3px rgba(255, 255, 255, 0.6),
inset 2px 2px 3px rgba(0, 0, 0, 0.6);
}
| , , , (, , ), . | |
| . | |
| , . | |
| . | |
| ARIA |
button
|
| ARIA |
checkbox, link,
menuitem,
menuitemcheckbox,
menuitemradio, radio,
switch, tab
|
| DOM | HTMLButtonElement |
autofocus , . autofocus .
autocomplete This attribute on a <button> is nonstandard and Firefox-specific. Unlike other browsers, Firefox persists the dynamic disabled state of a <button> across page loads. Setting autocomplete="off" disables this feature; see Firefox bug 654072.
disabled, .
Firefox, unlike other browsers, persist the dynamic disabled state of a <button> across page loads. Use the autocomplete attribute to control this feature.
form <form> (" "). <form> id . form <form> <form> .
form <form> , <form> .
formaction<button> , URL. , action . .
formenctype<button> , formenctype . .
, enctype .
formmethod<button> , formmethod HTTP . .
post: HTTP . , .get: action URL ? . , . , method .
formnovalidate<button> , formnovalidate . , novalidate .
formtarget<button> , formtarget . (, , <iframe>) . , target . .
_self: . ._blank: . , ._parent: . _self ._top: ( , ) . _self .name . , value .
type. .
submit: . , .reset: <input type="reset">, .button: . .value . , value .
<button> <input> . <input> value , <button> HTML (<em>, **, <img>) ::after ::before .
type button . , ( ) .
<button name="button"></button>
, <button> .
<button name="favorite" type="button">
<svg aria-hidden="true" viewBox="0 0 10 10">
<path d="M7 9L5 8 3 9V6L1 4h3l1-3 1 3h3L7 6z" />
</svg>
Add to favorites
</button>
, CSS , .
, . , .
. , . 44x44 CSS .
. .
margin CSS .
Firefox will add a small dotted border on a focused button. This border is declared through CSS in the browser stylesheet, but you can override it to add your own focused style using <a href="/ko/docs/Web/CSS/::-moz-focus-inner">button::-moz-focus-inner { }</a>.
If overridden, it is important to ensure that the state change when focus is moved to the button is high enough that people experiencing low vision conditions will be able to perceive it.
Color contrast ratio is determined by comparing the luminosity of the button text and background color values compared to the background the button is placed on. In order to meet current Web Content Accessibility Guidelines (WCAG), a ratio of 4.5:1 is required for text content and 3:1 for large text. (Large text is defined as 18.66px and bold or larger, or 24px or larger.)
<button> . <input> type="button" type="submit" .
| Windows 8.1 | OS X 10.X | |
|---|---|---|
| Firefox | - Firefox 30.0 |
(tabindex ) - Firefox 63
|
| Chrome | - Chrome 35 | - Chrome 65 |
| Safari | N/A |
(tabindex ) - Safari 12 (bug 22261)
|
| Internet Explorer | - Internet Explorer 11 | N/A |
| Presto | - Opera 12 | - Opera 12 |
| iOS 7.1.2 | Android 4.4.4 | |
|---|---|---|
| Safari Mobile | (tabindex ) |
N/A |
| Chrome 35 | (tabindex ) |
| Specification |
|---|
| HTML # the-button-element |
This page was last modified on 2026 4 15 by MDN contributors.
<a><abbr><acronym><address><area><article><aside><audio><b><base><bdi><bdo><big><blockquote><body><br><button><canvas><caption><center><cite><code><col><colgroup><data><datalist><dd><del><details><dfn><dialog><dir><div><dl><dt><em><embed><fencedframe><fieldset><figcaption><figure><font><footer><form><frame><frameset><geolocation><h1><head><header><hgroup><hr><html><i><iframe><img><input><ins><kbd><label><legend><li><link><main><map><mark><marquee><menu><meta><meter><nav><nobr><noembed><noframes><noscript><object><ol><optgroup><option><output><p><param><picture><plaintext><pre><progress><q><rb><rp><rt><rtc><ruby><s><samp><script><search><section><select><selectedcontent><slot><small><source><span><strike><strong><style><sub><summary><sup><table><tbody><td><template><textarea><tfoot><th><thead><time><title><tr><track><tt><u><ul><var><video><wbr><xmp><input> types<input type="button"><input type="checkbox"><input type="color"><input type="date"><input type="datetime-local"><input type="email"><input type="file"><input type="hidden"><input type="image"><input type="month"><input type="number"><input type="password"><input type="radio"><input type="range"><input type="reset"><input type="search"><input type="submit"><input type="tel"><input type="text"><input type="time"><input type="url"><input type="week"><script type>Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |