[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ja/docs/Web/HTML/Reference/Elements/form [Back]  [Original]

<form> - HTML | MDN

MDN Web Docs

View in English Always switch to English

<form>

Baseline

20157

<form> HTML

<form action="" method="get" class="form-example">
  <div class="form-example">
    <label for="name">: </label>
    <input type="text" name="name" id="name" required />
  </div>
  <div class="form-example">
    <label for="email">: </label>
    <input type="email" name="email" id="email" required />
  </div>
  <div class="form-example">
    <input type="submit" value="!" />
  </div>
</form>
form.form-example {
  display: table;
}

div.form-example {
  display: table-row;
}

label,
input {
  display: table-cell;
  margin-bottom: 10px;
}

label {
  padding-right: 10px;
}

CSS :valid :invalid <form>

accept

: <input type=file> accept

accept-charset

"UTF-8" HTML

autocapitalize

autocapitalize

autocomplete

input autocomplete <form>

name

form WindowDocumentdocument.forms

rel

externalnofollowopenernoopenernoreferrer helpprevnextsearchlicense rel

action

URL <button><input type="submit"><input type="image"> formaction method="dialog"

enctype

method post MIME

  • application/x-www-form-urlencoded:
  • multipart/form-data: <input> type=file
  • text/plain:

<button><input type="submit"><input type="image"> formenctype

method

HTTP /

<button><input type="submit"><input type="image"> formmethod

novalidate

<button><input type="submit"><input type="image"> formnovalidate

target

<button><input type="submit"><input type="image"> formtarget

html
<!--  URL  GET  -->
<form method="get">
  <label>
    Name:
    <input name="submitted-name" autocomplete="name" />
  </label>
  <button>Save</button>
</form>

<!--  URL  POST  -->
<form method="post">
  <label>
    Name:
    <input name="submitted-name" autocomplete="name" />
  </label>
  <button>Save</button>
</form>

<!-- fieldset, legend, label  -->
<form method="post">
  <fieldset>
    <legend>Do you agree to the terms?</legend>
    <label><input type="radio" name="radio" value="yes" /> Yes</label>
    <label><input type="radio" name="radio" value="no" /> No</label>
  </fieldset>
</form>

<form>
ARIA form
ARIA search, none, presentation
DOM HTMLFormElement

HTML
# the-form-element


Web Proxy Viewer  |  New URL  |  Original Page