Adding validation attributes like label, required, minlength, and pattern to a form improves the quality of user input. An input without a label is like a button with no name on it — nobody knows what it's supposed to do.
html
<form>
<label for="email">Email address</label>
<input id="email" name="email" type="email" required>
<label for="password">Password</label>
<input id="password" name="password" type="password" minlength="8" required>
<button type="submit">Create account</button>
</form>You should see
The browser will do basic checks on things like email format, required fields, and password length.