Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

button

Description

The button element for HTML represents a button labeled by its contents.

Syntax

HTML

<button attribute-name="attribute-value"></button>

Attributes

Global

NameValueDescription
autofocusautofocus | emptySpecifies that the element represents a control to which a UA is meant to give focus as soon as the document is loaded
disableddisabled | emptySpecifies that the element represents a disabled control
formIDREFIdentifies a form with which to associate the element
formactionURIForm-submission action for the element
formenctypeapplication/x-www-form-urlencoded | multipart/form-data | text/plainMIME type with which a UA is meant to associate this element for form submission
formmethodget | post | put | deleteHTTP method with which a UA is meant to associate this element for form submission
formnovalidateformnovalidate | emptySpecifies that the element represents a control whose value is not meant to be validated during form submission
formtargetbrowsing-context name or keywordBrowsing context or keyword that represents the target of the control
namestringName part of the name/value pair associated with this element for the purposes of form submission
typesubmit | reset | buttonSpecifies that its button element is a button for submitting a form, for resetting a form, or with no additional semantics
valuestringSpecifies a value

Examples

1 · autofocus

2 · disabled

3 · form

4 · formaction

5 · formenctype

6 · formmethod

7 · formnovalidate

8 · formtarget

9 · name

10 · type

11 · value

12 · CSS

!doctype

a

abbr

address

area

article

aside

audio

b

base

bdi

bdo

blockquote

body

br

canvas

caption

cite

code

col

colgroup

data

datalist

dd

del

details

dfn

dialog

div

dl

dt

em

embed

fieldset

figcaption

figure

footer

form

h1

h2

h3

h4

h5

h6

head

header

hgroup

hr

html

i

iframe

img

input

ins

kbd

label

legend

li

link

main

map

mark

menu

meta

meter

nav

noscript

object

ol

optgroup

option

output

p

param

picture

pre

progress

q

rb

rp

rt

rtc

ruby

s

samp

script

search

section

select

slot

small

source

span

strong

style

sub

summary

sup

table

tbody

td

template

textarea

tfoot

th

thead

time

title

tr

track

u

ul

var

video

wbr

Web Hypertext Application Technology Working Group (WHATWG)

HomeMenu