A form hint gives people guidance beyond a field label, such as an expected format, example, or where to find requested information. Keep it near the field and associate it visually and programmatically so users can find and understand it. section 6.1.2 section 6.6
Make required fields clear. Writing “Email (required)” beside a label is clearer than relying on an asterisk; if nearly all fields are required, a form-level instruction is an option, but users must remember it. Consider removing optional fields that are not needed for the task. section 6.1.2
A booking reference field
A hint can tell users to enter the 8-character code from their confirmation email and show an example such as BID12345. Associate the hint with the input using aria-describedby, and mark the input required when the field is mandatory. section 6.1.2
Put help beside unfamiliar terms or instructions so users can stay with the task. Tooltips can offer brief explanations, but make their information available through controls usable with a keyboard, pointing device, and touch; hover-only help can exclude users. section 6.6
...
<p>
Required fields are marked with an asterisk (*) #A
</p> ...
<div>
<label for="booking-ref">
Booking reference * #B
</label>
<p id="booking-ref-hint"> #C
Enter the 8-character code from your confirmation email (BID12345)
</p>
<input
id="booking-ref"
name="booking-ref"
type="text"
required #D
aria-describedby="booking-ref-hint"> #E
</div>
...See the booking-reference example, including its visible hint, required attribute, and programmatic hint association. section 6.1.2
