I am creating a login form where placed a “Forgot Password” link right before the password input field. The problem is that when the user fills in their username and presses the tab, the focus goes to the “Forgot Password” link instead of the password input field. Is there a way to prevent the tab key from focusing on the “Forgot Password” link and instead jump to the password input field?
<form>
<label for="username">Username</label>
<input type="text" id="username" name="username">
<a href="#" id="forgot-password">Forgot Password</a>
<label for="password">Password</label>
<input type="password" id="password" name="password">
<button type="submit">Log In</button>
</form>
Any help or guidance would be greatly appreciated. Thank you in advance!