autoscale: true
<form>
(HTMLFormElement)<label>
<input type="...">
<textarea>
<select>
and<option>
<button>
<form method="post" action="/" id="login-form">
<div class="input-field">
<label for="email-input">Email</label>
<input
type="email"
name="email-input"
id="email-input"
placeholder="[email protected]"
required
/>
</div>
<div class="input-field">
<label for="password-input">Password</label>
<input type="password" name="password-input" id="password-input" required />
</div>
<div class="input-field">
<input type="submit" value="Log In" />
</div>
</form>
text
: the one you use everywherecheckbox
: a checkboxhidden
: holds data, doesn't appearpassword
: doesn't show the inputradio
: allows a single value to be selected out of multiple choicessubmit
: button that submits the formreset
: button that clears the formbutton
: a button with no default behavior
color
date
datetime-local
email
number
tel
time
url
focus
: element gained focusblur
: element lost focusinput
: element's value changedchange
: "a change to the element's value is committed by the user," usually after losing focussubmit
: submit button was pressedreset
: reset button was pressed
event.target
event.preventDefault()
createElement
appendChild
setAttribute
getAttribute
removeAttribute
Validation refers to the process of checking to make sure that data entered by a user is present and correct before it is used programmatically or stored somewhere.
We can validate data on the client-side AND/OR on the server-side (usually both).
If data is invalid, we want to know so that we can do something, like generate an error that alerts the user (or not do something! We wouldn't want to save faulty data to a database). {"mode":"full","isActive":false}