Some forms include certain input fields that must be completed in order to submit the form. Such fields should be clearly indicated to the user. This will avoid them submitting the form with information missing and having to return to the form to correct it.
There are several ways to indicate that a input field is required:
// Indicating a required field by including the word required in the label associated with the input field
<form id="Your login details" action="submit.php" method="post">
<label for="name">Your Name [Required]:</label>
<input type="text" name="name" id="name" />
</form>
// Indicating a required field by using the WAI-ARIA attribute 'aria-required' on the input field
<form id="Your login details" action="submit.php" method="post">
<label for="name">Your Name:</label>
<input type="text" name="name" id="name" aria-required="true" />
</form>
// Indicating a required field by using the HTML5 attribute 'required' on the input field
<form id="Your login details" action="submit.php" method="post">
<label for="name">Your Name:</label>
<input type="text" name="name" id="name" required>
</form>